Re: Subscript value out of Bounds

new topic     » goto parent     » topic index » view thread      » older message » newer message
petelomax said...
Icy_Viking said...

Error: subscript value 0 is out of bounds, assigning to a sequence of length 1 - in subscript #1 of 'buildings'

for i = 0 to MAX_BUILDINGS do 
	buildings[i] = GetRandomValue(50,200) --error is coming from this line 

Well, that one's certainly guaranteed. Surely you meant for i = 1 to MAX_BUILDINGS do? There's at least one more further on.

There's my error. I forget Euphoria starts 1, while C starts at 0.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu