Jump to content




[LUA][Error] main.lua:92: attempt to call string

lua

2 replies to this topic

#1 iceDave

  • New Members
  • 2 posts

Posted 10 December 2012 - 09:50 PM

Hi there, i wrote a program that runs in a loop.
If i run it the first time, everything is working fine. It communicate with the second computer, turns the redpower on / off for the side what i choose.. like i sad, runs fine.
If i run it the second time i get this error on line 92... attemt to call string

main.lua (computer id 7)
Spoiler


switch.lua (computer id 8)
Spoiler

would be really great if someone could help me, i really can't figure out why this happen and how i could fix it.

#2 faubiguy

  • Members
  • 213 posts

Posted 11 December 2012 - 03:58 AM

When you do
engine_no = engine
it overwrites the function engine_no with the string engine, so next time you try to call engine_no it calls the string instead, and crashes.

#3 iceDave

  • New Members
  • 2 posts

Posted 11 December 2012 - 10:21 AM

Thanks mate, it fixed my program.. its to easy to mess up a program :S





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users