Jump to content




[Lua][Error]Bad Argument #1(expected number) using REther Turtle


  • You cannot reply to this topic
3 replies to this topic

#1 sulliv57

  • New Members
  • 2 posts

Posted 20 April 2013 - 01:18 PM

http://pastebin.com/kXYBiBey
It gives me a bad argument error. Does the setFreq() function not work with variables or tables. Even after setting the table as a variable it didn't work. The 1st argument is stated as 1000.

Sorry if this is formatted/in the wrong section. First post here and not on the FTB reddit.

#2 Engineer

  • Members
  • 1,378 posts
  • LocationThe Netherlands

Posted 20 April 2013 - 01:21 PM

tArgs is standard a string. Just use a tonumber(tArgs[1]) and you should be fine. Also in your if statement, you have to put "help" instead of help. Lua tries to take it as a variable, but there is none so its going to error out.

#3 sulliv57

  • New Members
  • 2 posts

Posted 20 April 2013 - 01:59 PM

That section worked, however the get() is always returning false. Is the use in this not the correct use. I could just hook up some redstone to the back from a reciever but I would much rather use the turtle itself to tell.

#4 Engineer

  • Members
  • 1,378 posts
  • LocationThe Netherlands

Posted 20 April 2013 - 10:06 PM

I think w.get() instead of get() fixes it :P





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users