This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-08-17 13:55:39

razor2
Scratcher
Registered: 2010-06-28
Posts: 100+

Variable glich

you can't run this script right


set biome to < pick random (item 1st of BIOMELST) to [item last of BIOMELST] >


Help my collab:http://scratch.mit.edu/forums/viewtopic.php?id=113553

Offline

 

#2 2012-08-17 14:08:21

berberberber
Scratcher
Registered: 2012-03-08
Posts: 1000+

Re: Variable glich

razor2 wrote:

you can't run this script right


set biome to < pick random (item 1st of BIOMELST) to [item last of BIOMELST] >

You made a scripting mistake.

Here:

set [biome v] to (item [any v] of [biome list v])


http://i47.tinypic.com/2iaa73k.png

Offline

 

#3 2012-08-17 15:59:21

Firedrake969
Scratcher
Registered: 2011-11-24
Posts: 1000+

Re: Variable glich

berberberber wrote:

razor2 wrote:

you can't run this script right


set biome to < pick random (item 1st of BIOMELST) to [item last of BIOMELST] >

You made a scripting mistake.

Here:

set [biome v] to (item [any v] of [biome list v])

It could be

set [biome v] to (pick random (item (1 v) of [BIOMELIST v]) to (item (last v) of [BIOMELIST v]))


Click the sign.
https://s3.amazonaws.com/eterna/eterna2/logo2.png

Offline

 

#4 2012-08-17 16:33:01

Wes64
Scratcher
Registered: 2011-08-19
Posts: 1000+

Re: Variable glich

Firedrake969 wrote:

berberberber wrote:

razor2 wrote:

you can't run this script right


set biome to < pick random (item 1st of BIOMELST) to [item last of BIOMELST] >

You made a scripting mistake.

Here:

set [biome v] to (item [any v] of [biome list v])

It could be

set [biome v] to (pick random (item (1 v) of [BIOMELIST v]) to (item (last v) of [BIOMELIST v]))

no that does not work...

if item 1 of biomelist is "tundra" and item last is "grassland", then "pich random (tundra to grassland" has no answer.


Experienced 2.0 Tester: Ask me questions!
Using Firefox 13.0, Flash plugin version 11.4.402.287, and Windows XP Professional.

Offline

 

#5 2012-08-17 16:48:00

razor2
Scratcher
Registered: 2010-06-28
Posts: 100+

Re: Variable glich

Got it. I needed it for this project: http://scratch.mit.edu/projects/razor2/2734412


Help my collab:http://scratch.mit.edu/forums/viewtopic.php?id=113553

Offline

 

#6 2012-08-18 02:32:33

TorbyFork234
Scratcher
Registered: 2012-03-01
Posts: 1000+

Re: Variable glich

you could also do

set [biome v] to <item (pick random (1) to <length of [BIOMELIST v]>) of [BIOMELIST v]>

Offline

 

Board footer