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

Help With Command Decoder Using String.gmatch() Iteration

Started by hasunwoo, 03 August 2013 - 03:39 AM
hasunwoo #1
Posted 03 August 2013 - 05:39 AM
http://pastebin.com/74yv9VH1
it doesn't work and cause error "bios:337: [String "cmd" ]:13: unexpected symbol".
please help me
Kilobyte #2
Posted 03 August 2013 - 05:58 AM
Don't put local infront of table element assignations. commands is already local so no need to redeclare it as local.

=> remove the local on line 13
HurricaneCoder #3
Posted 03 August 2013 - 09:05 AM
when you type local it will basically define a new varible. So in some cases you don't have to put local.
immibis #4
Posted 03 August 2013 - 09:37 PM
command[loop] isn't a variable, command is.