Posted 07 August 2013 - 04:28 PM
Now I'm a bit confused here but what I'm attempting to do is access the turtle table inside the _G table (the globals). I'm creating a program to remotely control my turtles and I want to be able to put a command into a variable and call that variable as a function. For example, if the turtle was send "forward" it would create a string that has the value "turtle.forward()" and then call it from the global table so I don't need to use lots of if statements to make the turtle do my bidding.
Code: http://pastebin.com/Ark26Nu5
I tried manually printing _G and it comes up with a list of tables (as you would expect) however I'm not sure how to access the "turtle" table from within _G.
Edit: Problem is around line 36
Any help would be appreciated.
Thanks.
Code: http://pastebin.com/Ark26Nu5
I tried manually printing _G and it comes up with a list of tables (as you would expect) however I'm not sure how to access the "turtle" table from within _G.
Edit: Problem is around line 36
Any help would be appreciated.
Thanks.