Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal

DeGariless

Members
  • Content Count

    3
  • Joined

  • Last visited

Everything posted by DeGariless

  1. I'll use short example programs to explain exactly what I am trying to achieve. I have a a file test.lua that looks like this testAPI = require("testAPI") testAPI.talk() testAPI.setWord("Goodbye") testAPI.talk() I also have a file /lib/testAPI.lua that looks like this testAPI = {} local word = "Hello" function testAPI.talk() print(word) end function testAPI.setWord(s) word = s end return testAPI when I run test.lua for the first time I get the output Hello Goodbye but than I run it a second time and I get Goodbye Goodbye How can I get the variable 'word' to reset
  2. There are about 30 players in the PlayerData.json file at the moment. I realize that as the number grows, it will become a problem. I plan to have some players automatically removed, or moved to a separate inactive players file of some sort. Thanks for the tip about sorting the table more efficiently. I'll I'll have to take that into consideration in the future. Don't know why I didn't think of that. xpcall(main, debug.traceback) is exactly what I was originally looking for. Thanks Thanks for all the tips. I really appreciate it, but unfortunately my problem is stil
  3. So, I wrote the program for the spawn computer of a server I play on. Shows rules, announcements etc. Here is is in case you care to look. http://pastebin.com/QYpCrzEp The program runs great for long periods of time, but will randomly show the error "Too long without yielding". It has plenty of os.sleep(x) calls to prevent it from erroring. You can see I have added some extra code near line 365 in hopes to prevent the computer from erroring out. It didn't seem to help nearly as much as I hoped. I think it has to do with when the server lags. Anyone know how to fix this? Thanks.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.