Jump to content




[LUA][ERROR]Too Long without yielding[SOLVED]


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

#1 CreeperGoBoom

  • Members
  • 91 posts

Posted 30 November 2012 - 11:26 PM

Hey guys, im new here at this forum, first of all hi guys :D

now im having a small problem

i created a program called lockit which outputs redstone signal to a set of doors i have going in my mines

program worked fine up until i decided to mess around with a login/logout feature (just for fun)

probably a silly part of code, i have some experience with coding, probably looks like crap to you guys but im very tired at the moment so bear with me :D

heres the code

http://pastebin.com/UMTtKVy9
Getting the error: Too long without yielding, but the line number on the error is different each time

and yes i have searched the forums for a few hours now but none of the fixes apply to my scenario (maybe i missed one, i dunno)

Any help would be greatly appreciated

#2 Luanub

    Lua Nub

  • Members
  • 1,135 posts
  • LocationPortland OR

Posted 30 November 2012 - 11:44 PM

The problem is you have the "if not Logged then" nested in the "if Logged then" so the script never runs it. Which means it just runs the clears and write without yielding.

IMO the best solution is the change the not Logged to an elseif and remove one end. The reason being is you're only checking the one thing Logged so its probably best to check it in one statement.

Spoiler


#3 CreeperGoBoom

  • Members
  • 91 posts

Posted 30 November 2012 - 11:55 PM

ill keep that one in mind, thanks :D





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users