Jump to content




[Error] Something I don't understand


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

#1 InputUsername

  • Members
  • 231 posts
  • LocationThe Netherlands

Posted 08 October 2012 - 03:10 PM

Spoiler

Nevermind, I think I am going to study Lua for the next 10 years so I'll be able to program a decent application or game.

#2 OmegaVest

  • Members
  • 436 posts

Posted 08 October 2012 - 03:22 PM

You've got an extra open parense ( ( ) in there. At term.setCursorPos().

Common bug. I find myself having a similar problem . . . well, a lot of the time.

#3 InputUsername

  • Members
  • 231 posts
  • LocationThe Netherlands

Posted 08 October 2012 - 03:30 PM

View PostOmegaVest, on 08 October 2012 - 03:22 PM, said:

You've got an extra open parense ( ( ) in there. At term.setCursorPos().

Common bug. I find myself having a similar problem . . . well, a lot of the time.

I removed it and it didn't help, it still gave the same error. Thanks anyway :D/>

#4 OmegaVest

  • Members
  • 436 posts

Posted 08 October 2012 - 03:39 PM

After reviewing, I come with another possible fix.
This one I don't know to be the case, but I'm pretty sure it is. write needs to be called from its target. ie mon.write(), or in your case term.write(). Probably because of that very difference.

On the other hand, print does not need such a call (because I'm fairly sure it's in the os api).

#5 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 08 October 2012 - 06:45 PM

Funtion should be function. Also, if you don't post the exact code with the same number of lines (yours seems to be missing three or so), it's much harder for us to find the error by line number.

#6 InputUsername

  • Members
  • 231 posts
  • LocationThe Netherlands

Posted 09 October 2012 - 01:51 PM

Thanks for the help. I already warned you for the noobieness and while posting the code it kinda got screwed up -,-

Again, thanks, I'll try it out as soon as I'm home





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users