This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Bimgo's profile picture

[LUA]

Started by Bimgo, 20 January 2013 - 09:40 AM
Bimgo #1
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.
remiX #2
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.
Bimgo #3
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 …
remiX #4
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.
theoriginalbit #5
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…
TheOddByte #6
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
theoriginalbit #7
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 !!!