ID:172595
 
Okay I was testing something, and when I was talking to the guy Informant, I get this runtime
Infinite loop suspected--switching proc to background.
If it is not an infinite loop, either do 'set background=1' or set world.loop_checks=0.
proc name: New (/world/New)
usr: null
src:
call stack:
: New()
Why did I get this? Here's Informant's code.
        Informant
icon_state = "green"
name = "Informant"
verb
Converse()
set src in view (1)
if(usr.informant == 0)
usr << "[src]: Please, leave me alone right now, I'm busy, if you need help, talk to the Recruiter."
else if(usr.informant == 1)
usr.informant = 2
usr.islocked = 1
usr << "[src]: I have been informed to tell you about how we in the Retriever's Guild."
sleep(8)
usr << "[usr]: Yeah! I want to know already!"
sleep(8)
usr << "[src]: Fiesty are we? Either way, this system is very simple. People of the past have lost items when the world changed. Many people lost thier vaulables and we were formed to find them. But so many items were lost that just a group of people couldn't get them, so we set up HQs all over the new world."
sleep(8)
usr << "[src]: Now, all over the world the valuables of those who lost them are being returned because of us. The way we find these objects is simple, someone informs us that they lost thier object and the place they were in when the world changed, and we target the portals to your left to warp you to that version of this world. While you wont pass in time, the portals will shift you to the form the world was if it was never changed."
sleep(8)
usr << "[src]: This makes it so that we can return these items to thier owners without changing the past. There are 3 portals there as well. Each one makes a different location in which you are transported to. They all in the end lead to the same place, but each one is a different dungeon, so its better to choose the same one each time."
sleep(8)
usr << "[src]: Depending on what quest you are on, the location the portal will bring you to will be different from someone else. So someone on the 15th quest cannot help someone on the 3rd quest."
sleep(8)
usr << "[src]: That's about it, anything I missed will be told to you by the recruiter now. I'll seeya later!"
sleep(8)
usr << "[usr]: Alright, I'll seeya later, have fun!"
usr.islocked = 0
else if(usr.informant >= 2)
usr.islocked = 1
switch(alert("[src]: Hey! Do you want to hear everything about the Retriever's Guild again?","Hear again?","Yes","No"))
if("Yes")
usr << "[src]: Okay then, I'll repeat myself."
sleep(8)
usr << "[src]: I have been informed to tell you about how we in the Retriever's Guild."
sleep(8)
usr << "[usr]: Yeah! I want to know already!"
sleep(8)
usr << "[src]: Fiesty are we? Either way, this system is very simple. People of the past have lost items when the world changed. Many people lost thier vaulables and we were formed to find them. But so many items were lost that just a group of people couldn't get them, so we set up HQs all over the new world."
sleep(8)
usr << "[src]: Now, all over the world the valuables of those who lost them are being returned because of us. The way we find these objects is simple, someone informs us that they lost thier object and the place they were in when the world changed, and we target the portals to your left to warp you to that version of this world. While you wont pass in time, the portals will shift you to the form the world was if it was never changed."
sleep(8)
usr << "[src]: This makes it so that we can return these items to thier owners without changing the past. There are 3 portals there as well. Each one makes a different location in which you are transported to. They all in the end lead to the same place, but each one is a different dungeon, so its better to choose the same one each time."
sleep(8)
usr << "[src]: Depending on what quest you are on, the location the portal will bring you to will be different from someone else. So someone on the 15th quest cannot help someone on the 3rd quest."
sleep(8)
usr << "[src]: That's about it, anything I missed will be told to you by the recruiter now. I'll seeya later!"
sleep(8)
usr << "[usr]: Alright, I'll seeya later, have fun!"
usr.islocked = 0
if("No")
usr << "[src]: Okay, I'll seeya later."


Any help will be great.
Metroid wrote:
Okay I was testing something, and when I was talking to the guy Informant, I get this runtime
Infinite loop suspected--switching proc to background.
If it is not an infinite loop, either do 'set background=1' or set world.loop_checks=0.
proc name: New (/world/New)
usr: null
src:
call stack:
: New()

It has absolutely nothing to do with your Converse() code. You are doing something in world.New() that is repeating infinitely.
In response to Shadowdarke
Yea but I never did anything to New(/world/New) yet...Ill check it out and get back to you.

EDIT:
world/New()
spawn
while(1)
sleep(300)
for(var/obj in world)
for(var/mob/M in world)
sleep(300)
Repop()

thats the only time I do world/New() in my entire code, and its always worked before, only recently its happened.
In response to Metroid
Metroid wrote:
> world/New()
> spawn
> while(1)
> sleep(300)
> for(var/obj in world)
> for(var/mob/M in world)
> sleep(300)
> Repop()
>


That particular snippet shouldn't be producing that error, since you do have a sleep() in the loop. However, those for loops should not be there. They have no effect whatsoever on the Repop() call within. I know this comes from a tutorial somewhere and it is teaching an extremely bad example.

The proper way to do precisely the same thing is
world/New()
spawn()
while(1)
sleep(300)
Repop()