AutoSave()
save
while(1)
src.Save()
sleep(AutoSaveTime)
continue save
ID:156853
Jul 13 2010, 7:12 am
|
|
Jul 13 2010, 7:15 am
|
|
The continue statement is absolutely and utterly pointless, if that's what you mean.
|
Yes, very much so.
You are calling an infinite loop with while(1), which isn't bad, but then you are using goto + label, causing more infinite loops to happen and eventually it'll suck away your computer's blood (resources). The start label is, as Popisfizzy mentioned, pointless. while(1) is doing what you want. (Edit: Noted that you used continued instead of goto. What continue does is tells the while(1) loop to continue to the next entry, not go to the label specified). Get rid of the start and continue and it is good. |
In response to Popisfizzy
|
|
Hmm so will the sleep() loop it anyways without continue?
Edit: Would making it a normal proc and using world/New() then making it search every player be a better way instead of making each character have this proc? Also any examples i tried it this way and banged some text on it to see if would work and the text didn't show sadly :(. |
In response to Rickoshay
|
|
while() is the one causing the infinite loop, sleep() causes the delay within the loop.
Hint: Check out the DM reference entries for those two procedures |
In response to GhostAnime
|
|
I know what while() does. Also the proc is an autosave i want it to carry on. Also check my edit in my last post.
|
In response to Rickoshay
|
|
Rickoshay wrote:
I know what while() does. No, you don't. Read the Reference. |
In response to Garthor
|
|
Ok so maybe i didn't, i just assumed anyways can you read my edited post no the one above the other one of wether or not that would be a better way? Or give me an example of what would be a better way.
Example: world |