7 posts
Location
Sion / Valais / Suisse
Posted 20 January 2013 - 10:40 AM
Hello, i have some problem to understand where i have make an error…
Here is my code :
rednet.open("right")
posX, posY, posZ = gps.locate(5)
rednet.close("right")
print("coord received")
print("coord x" ..posX)
print("coord y" ..posY)
print("coord z" ..posz)
i have 4 GPS station started and when i lanche this prog on my turtle i have this reponse :
coord received
coord x549
coord y105
3:8 attempt to concatenate string and nil
i don't now why the z value don't work fin and the x and y work…
my info when i press F3 x 549 y 105 z 632.
Thanks all for any help you can give me to try to find the solution.
2088 posts
Location
South Africa
Posted 20 January 2013 - 11:02 AM
You're trying to concatenate posz which is nil. You defined your Z co-ord as posZ. Case-sensitive.
7 posts
Location
Sion / Valais / Suisse
Posted 20 January 2013 - 11:18 AM
Thanks and sorry for the stupid question as first forum intervention…
i have passed ~1h to find the error …
2088 posts
Location
South Africa
Posted 20 January 2013 - 11:20 AM
Thanks and sorry for the stupid question as first forum intervention…
i have passed ~1h to find the error …
No worries :P/>
A lot of people do this, even advanced users.
7508 posts
Location
Australia
Posted 20 January 2013 - 11:28 AM
Thanks and sorry for the stupid question as first forum intervention…
i have passed ~1h to find the error …
Should have seen what I did the other day… I had something like "sizeO" and i had typed "size0"… THAT took SO long to find… As remiX said, It happens to the best of us…
1852 posts
Location
Sweden
Posted 20 January 2013 - 12:05 PM
Thanks and sorry for the stupid question as first forum intervention…
i have passed ~1h to find the error …
Should have seen what I did the other day… I had something like "sizeO" and i had typed "size0"… THAT took SO long to find… As remiX said, It happens to the best of us…
That can be real annoying if you have a long code and all the error was, Was a little typo!
Anyway… Nice gif with the smiley there xD
7508 posts
Location
Australia
Posted 20 January 2013 - 12:07 PM
That can be real annoying if you have a long code and all the error was, Was a little typo!
Yeh typos are hard to see sometimes… especially when its something like O and 0 !!!