Posted 06 December 2013 - 11:29 PM
I have a problem with my api when I go to use a few functions…
here is the api. http://pastebin.com/zYeRnCZb
the problem is when I use the startLoc() function and then the getLoc() function and I try to print the facing variable to the screen it gives me the attempt to concatenate string and nil error.
Here is and example of a basic program using those function and where I get the error.
t.getLoc()
print("I am here"..x..","..y..","..z..". Facing"..facing)
t.tl()
t.getLoc()
print("I am now facing"..facing)
t.tl()
t.getLoc()
print("I am now facing"..facing)
t.tl()
t.getLoc()
print("I am now facing"..facing)
t.tle()
t.getLoc()
print("I am now facing"..facing)
The error happens
test:2: attempt to concatenate string and nil
thanks for any help
here is the api. http://pastebin.com/zYeRnCZb
the problem is when I use the startLoc() function and then the getLoc() function and I try to print the facing variable to the screen it gives me the attempt to concatenate string and nil error.
Here is and example of a basic program using those function and where I get the error.
t.getLoc()
print("I am here"..x..","..y..","..z..". Facing"..facing)
t.tl()
t.getLoc()
print("I am now facing"..facing)
t.tl()
t.getLoc()
print("I am now facing"..facing)
t.tl()
t.getLoc()
print("I am now facing"..facing)
t.tle()
t.getLoc()
print("I am now facing"..facing)
The error happens
test:2: attempt to concatenate string and nil
thanks for any help