Help here please.

BlitzMax Forums/BlitzMax Beginners Area/Help here please.

Yue(Posted 2016) [#1]



Juiceter(Posted 2016) [#2]
You are indexing an element that doesn't exist.

Instead of 0 to 3 use 0 to 2.


Yue(Posted 2016) [#3]
This is very strange , I think it has four elements.

llantas[0]
llantas[1]
llantas[2]
llantas[3]



TomToad(Posted 2016) [#4]
The number in the Local llantas[3] indicates how many total indexes there are. In your example, that would be three. They are numbered 0,1, and 2. This is different from Blitz3D in which the number is the highest index instead of total number.


Yue(Posted 2016) [#5]
@TomToad Thanks you. :-)

Now if I have four tires.




Derron(Posted 2016) [#6]
Also keep in mind:

for local x:int = 0 to 3
-> 0, 1, 2

for local x:int = 0 until 3
-> 0, 1, 2, 3

Means, using "to" excludes the "right side" number while "until" includes it.


bye
Ron


Henri(Posted 2016) [#7]
Your example should probably be otherway around.

-Henri