ID:149575
 
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: Login (/mob/player/Login)
usr: Vegetto590 (/mob/player/FF7/Cloud)
src: Vegetto590 (/mob/player/FF7/Cloud)
call stack:
Vegetto590 (/mob/player/FF7/Cloud): Login()
Vegetto590 (/client): base LoadMob("Vegetto590")
ChoosingCharacter (/mob/BaseCamp/ChoosingCharacter): ChooseCharacter()
ChoosingCharacter (/mob/BaseCamp/ChoosingCharacter): Login()
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: Login (/mob/player/Login)
usr: Pike (/mob/player/FF1/BlackMage)
src: Pike (/mob/player/FF1/BlackMage)
call stack:
Pike (/mob/player/FF1/BlackMage): Login()
Jujenjitsu (/client): base LoadMob("Pike")
ChoosingCharacter (/mob/BaseCamp/ChoosingCharacter): ChooseCharacter()
ChoosingCharacter (/mob/BaseCamp/ChoosingCharacter): Login()









AAAAARGHHHHHH

everytime somone logs in it starts lagging.... bad... and then freezes i cant even host the game now grrrrrrrrr
By all means, then, don't post any code. Because that'd be a bad thing. If you did that, people might even try to help or something. The nerve of some people, helping out people who post the code that's giving them problems. You'd think this was the Code Problems forum or something.

Lummox JR
In response to Lummox JR
hmmm, maybe cause i Dont know where the code is? i dont get that error
- RaeKwon
In response to RaeKwon
Or hmmm what i mean is this effent loop change background to 0 and all this what! do i do
In response to RaeKwon
RaeKwon wrote:
hmmm, maybe cause i Dont know where the code is? i dont get that error
- RaeKwon

Well it's sure a good thing you didn't compile in debug mode, so you could get a line number. Line numbers are bad news. The first rule of debugging: If you have a bug, make sure you don't have anything that could point you to where it might be. And whatever you do, don't look at the procs that are listed in those stack traces, like ChoosingCharacter(), Login(), or LoadMob(). It'd be a bad idea to post the code for those.

Lummox JR
In response to Lummox JR
I hope he gets the idea :p

Anyway, Login is called each time the player switches mobs, not just when they "login" to the game.

If you call Load_Character (or whatever) inside Login and you assign the player to a new mob then it is going to call Login again, assign it a new mob again, call Login again, assign it a new mob again, and so on. You can compensate by checking the mobs type (assuming you give it a new type of mob in Load_Character) in Login.
In response to RaeKwon
RaeKwon wrote:
Or hmmm what i mean is this effent loop change background to 0 and all this what! do i do

Excellent! I see you've taken my advice not to post line numbers, the procs in question, or anything else relevant. But you've done me one better--you've abandoned all semblance of the English language. Bravo. Now nobody can figure out what you're asking. Clearly you're on the right track to get the best help available.

The next steps, of course, will be to start talking in l33t, sprinkle in some profanity, and insult everyone who ever talked to you. That's gonna be a dynamite way to get help with this. Good luck!

Lummox JR
In response to Lummox JR
im useing deadrons character handling, but if you want my whole login, here.


mob/player/Login()
if(logined == 0)
if((usr.key == "Ghaleon") || (usr.key == "RaeKwon") || (usr.key == "Dragon133") || (usr.key == "LilTrunks") || (usr.key == "SSJ Radditz"))
usr.agm = 1
usr.verbs += /mob/imm/verb/Fix_Sprite
usr.verbs += /mob/imm/verb/Summon
usr.verbs += /mob/imm/verb/Warp
usr.verbs += /mob/imm/verb/Boot
usr.verbs += /mob/imm/verb/Delete
usr.verbs += /mob/imm/verb/TempImm
usr.verbs += /mob/imm/verb/ServerEnd
usr.verbs += /mob/imm/verb/IPBan
usr.verbs += /mob/imm/verb/Paralyze
usr.verbs += /mob/imm/verb/DeImm
usr.verbs += /mob/imm/verb/Reboot
usr.verbs += /mob/imm/verb/Create
usr.verbs += /mob/imm/verb/Invisibility
usr.verbs += /mob/imm/verb/Echo
usr.verbs += /mob/imm/verb/Edit
usr.verbs += /mob/imm/verb/Silence
usr.icon_state = null
usr.loc=locate(1,6,1)
usr.logined = 1
world << "Bow [usr] The Admin Has Entered."
if (usr.Hp <= 0) usr.Hp = 1
usr << "
Welcome Admin!"
usr << "We are gathering very nice turfs, more 3d looking, they will be implented soon."
usr << "This is RaeKwons Server, not Dragon133 AKA Kefka, he hasnt bean on.. there was much demand for somone to host, so ill do it, ill transfer these saves to his saves when he is back, as well. so there wont be no loss :)"
usr << "Version 1.8B -"
usr << "New graphics, new party code, background client is now Black, 255 random colorsfor chat, bug fixes, another character class FF1 Fighter, and lots lots more! ENJOY!"
usr << "<font size = 3>Vote for FinalFantasyOnline on the BYOND 100!"
pk = 0
waitpk = 0
else
world << "[usr] Has Entered."
usr.loc=locate(1,6,1)
usr.logined = 1
usr << "We are gathering very nice turfs, more 3d looking, they will be implented soon."
usr << "This is RaeKwons Server, not Dragon133 AKA Kefka, he hasnt bean on.. there was much demand for somone to host, so ill do it, ill transfer these saves to his saves when he is back, as well. so there wont be no loss :)"
usr << "Version 1.8B -"
usr << "New graphics, new party code, background client is now Black, 255 random colorsfor chat, bug fixes, another character class FF1 Fighter, and lots lots more! ENJOY!"
usr << "<font size = 3>Vote for FinalFantasyOnline on the BYOND 100!"
pk = 0
waitpk = 0
else
if((usr.key == "Ghaleon") || (usr.key == "RaeKwon") || (usr.key == "Dragon133") || (usr.key == "LilTrunks") || (usr.key == "SSJ Radditz"))
usr.agm = 1
usr.verbs += /mob/imm/verb/Fix_Sprite
usr.verbs += /mob/imm/verb/Summon
usr.verbs += /mob/imm/verb/Warp
usr.verbs += /mob/imm/verb/Boot
usr.verbs += /mob/imm/verb/Delete
usr.verbs += /mob/imm/verb/TempImm
usr.verbs += /mob/imm/verb/ServerEnd
usr.verbs += /mob/imm/verb/IPBan
usr.verbs += /mob/imm/verb/Paralyze
usr.verbs += /mob/imm/verb/DeImm
usr.verbs += /mob/imm/verb/Reboot
usr.verbs += /mob/imm/verb/Create
usr.verbs += /mob/imm/verb/Invisibility
usr.verbs += /mob/imm/verb/Echo
usr.verbs += /mob/imm/verb/Edit
usr.verbs += /mob/imm/verb/Silence
usr.icon_state = null
if(XLoc && YLoc && ZLoc)
Move(locate(XLoc, YLoc, ZLoc))
if (usr.z > 1)
var/mob/M
for (M in oview())
del (M)
while (usr.z > 1)
usr.Move(locate(rand(1), rand(1), 1))
usr << sound(null)
usr.In_Battle = 0
world << "
Bow [usr] The Admin Has Entered."
if (usr.Hp <= 0) usr.Hp = 1
usr << "Welcome Admin!"
usr << "We are gathering very nice turfs, more 3d looking, they will be implented soon."
usr << "This is RaeKwons Server, not Dragon133 AKA Kefka, he hasnt bean on.. there was much demand for somone to host, so ill do it, ill transfer these saves to his saves when he is back, as well. so there wont be no loss :)"
usr << "Version 1.8B -"
usr << "New graphics, new party code, background client is now Black, 255 random colorsfor chat, bug fixes, another character class FF1 Fighter, and lots lots more! ENJOY!"
usr << "<font size = 3>Vote for FinalFantasyOnline on the BYOND 100!"
pk = 0
waitpk = 0
return ..()
else
if(XLoc && YLoc && ZLoc)
Move(locate(XLoc, YLoc, ZLoc))
if (usr.z > 1)
var/mob/M
for (M in oview())
del (M)
while (usr.z > 1)
usr.Move(locate(rand(1), rand(1), 1))
usr << sound(null)
usr.In_Battle = 0
world << "[usr] Has Entered."
if (usr.Hp <= 0) usr.Hp = 1
usr << "
Welcome to Final Fantasy Online [usr]!"
usr << "
We are gathering very nice turfs, more 3d looking, they will be implented soon."
usr << "This is RaeKwons Server, not Dragon133 AKA Kefka, he hasnt bean on.. there was much demand for somone to host, so ill do it, ill transfer these saves to his saves when he is back, as well. so there wont be no loss :)"
usr << "Version 1.8B -"
usr << "New graphics, new party code, background client is now Black, 255 random colorsfor chat, bug fixes, another character class FF1 Fighter, and lots lots more! ENJOY!"
usr << "<font size = 3>Vote for FinalFantasyOnline on the BYOND 100!"
pk = 0
waitpk = 0
return ..()
client/base_num_characters_allowed = 2
mob/creating_character
base_save_allowed = 0 // If player quits before choosing, don't want to save this mob.

Login()
// Spawn here to avoid problems with calling prompts during login.
spawn()
src.CreateCharacter()

proc/CreateCharacter()

// Get the character information from them. (You would probably want to do with this a browser page.)
var/char_name = input(src, "What is the character's name?", "Create Character", key) as text

if (!char_name)
// Guess they don't want to create a new character after all, so send them to choose a character.
alert("No name entered! Try Again!")
client.base_ChooseCharacter()
return
// Make sure there isn't already a character named that.
// Character names are stored as ckey, so get the ckey version of the name.
var/ckey_name = ckey(char_name)
var/list/characters = client.base_CharacterNames()
if (characters.Find(ckey_name))
alert("You already have a character named that! Please choose another name.")
src.CreateCharacter()
return

var/list/races = new()
if (gender == MALE)
races += "***Final Fantasy 1***"
races += "Black Mage"
races += "White Mage"
races += "Fighter"
races += "***Final Fantasy 4***"
races += "Dark Knight Cecil"
races += "Dragoon Kain"
races += "Tellah"
races += "***Final Fantasy 5***"
races += "Bartz"
races += "***Final Fantasy 6***"
races += "Edgar"
races += "Leo"
races += "Locke"
races += "Mog"
races += "Sabin"
races += "Setzer"
races += "Shadow"
races += "Strago"
races += "***Final Fantasy 7***"
races += "Cloud"
races += "Sephiroth"
races += "***Final Fantasy 8***"
races += "Seifer"
races += "Squall"
else if (gender == FEMALE)
races += "***Final Fantasy 1***"
races += "Black Mage"
races += "White Mage"
races += "Fighter"
races += "***Final Fantasy 4***"
races += "Kid Rydia"
races += "***Final Fantasy 5***"
races += "Reina"
races += "***Final Fantasy 6***"
races += "Celes"
races += "Relm"
races += "Terra"
races += "***Final Fantasy 8***"
races += "Quistis"
races += "Rinoa"
races += "***Final Fantasy 9***"
races += "Beatrix"
else
races += "***Final Fantasy 1***"
races += "Black Mage"
races += "White Mage"
races += "Fighter"
races += "***Final Fantasy 4***"
races += "Dark Knight Cecil"
races += "Dragoon Kain"
races += "Kid Rydia"
races += "Tellah"
races += "***Final Fantasy 5***"
races += "Bartz"
races += "Reina"
races += "***Final Fantasy 6***"
races += "Celes"
races += "Edgar"
races += "Leo"
races += "Locke"
races += "Mog"
races += "Relm"
races += "Sabin"
races += "Setzer"
races += "Shadow"
races += "Strago"
races += "Terra"
races += "***Final Fantasy 7***"
races += "Cloud"
races += "Sephiroth"
races += "***Final Fantasy 8***"
races += "Quistis"
races += "Rinoa"
races += "Seifer"
races += "Squall"
races += "***Final Fantasy 9***"
races += "Beatrix"
var/char_race = input("What class is [name]?", "Create Character", null) in races

// Okay we have enough information, so it's time to create the character and switch the player to it.
var/mob/new_mob
switch(char_race)

// Final Fantasy 1
if ("Black Mage") new_mob = new /mob/player/FF1/BlackMage()
if ("White Mage") new_mob = new /mob/player/FF1/WhiteMage()
if ("Fighter") new_mob = new /mob/player/FF1/Fighter()
//Final Fantasy 4
if ("Dark Knight Cecil") new_mob = new /mob/player/FF2/Cecil()
if ("Dragoon Kain") new_mob = new /mob/player/FF2/Kain()
if ("Kid Rydia") new_mob = new /mob/player/FF2/Rydia()
if ("Tellah") new_mob = new /mob/player/FF2/Tellah()
//Final Fantasy 5
if ("Bartz") new_mob = new /mob/player/FF5/Bartz()
if ("Reina") new_mob = new /mob/player/FF5/Reina()
//Final Fantasy 6
if ("Celes") new_mob = new /mob/player/FF6/Celes()
if ("Edgar") new_mob = new /mob/player/FF6/Edgar()
if ("Leo") new_mob = new /mob/player/FF6/Leo()
if ("Locke") new_mob = new /mob/player/FF6/Locke()
if ("Mog") new_mob = new /mob/player/FF6/Moogle()
if ("Relm") new_mob = new /mob/player/FF6/Relm()
if ("Sabin") new_mob = new /mob/player/FF6/Sabin()
if ("Setzer") new_mob = new /mob/player/FF6/Setzer()
if ("Shadow") new_mob = new /mob/player/FF6/Shadow()
if ("Strago") new_mob = new /mob/player/FF6/Strago()
if ("Terra") new_mob = new /mob/player/FF6/Terra()
//Final Fantasy 7
if ("Cloud") new_mob = new /mob/player/FF7/Cloud()
if ("Sephiroth") new_mob = new /mob/player/FF7/Sephiroth()
//Final Fantasy 8
if ("Rinoa") new_mob = new /mob/player/FF8/Rinoa()
if ("Quistis") new_mob = new /mob/player/FF8/Quistis()
if ("Seifer") new_mob = new /mob/player/FF8/Seifer()
if ("Squall") new_mob = new /mob/player/FF8/Squall()
//Final Fantasy 9
if ("Beatrix") new_mob = new /mob/player/FF9/Beatrix()
if ("***Final Fantasy 1***" || "***Final Fantasy 4***" || "***Final Fantasy 5***" || "***Final Fantasy 6***" || "***Final Fantasy 7***" || "***Final Fantasy 8***" || "***Final Fantasy 9***")
alert ("Invalid choice!")
src.CreateCharacter()
return
// Set the attributes.
new_mob.name = char_name
new_mob.gender = gender



// Now switch the player client over to the new mob and delete myself since I'm no longer needed.
src.client.mob = new_mob
del(src)

mob/player/Logout()
if (In_Battle)
if (Group || Leading_Group)
var/mob/M
var/I
var/Gval
if (Group)
Gval = Group
else
Gval = Leading_Group
for (M in view())
if (M.Group == Gval || M.Leading_Group == Gval)
if (M.Hp > 0)
I = 1
if (!I)
for (M in view())
if (!M.client)
del(M)
else
M.In_Battle = 0
M.Move(locate(M.XLoc, M.YLoc, M.ZLoc))
if (M.Hp < 1)
M.Hp = M.Max_Hp
Move(locate(XLoc, YLoc, ZLoc))
In_Battle = 0
world << "[usr] has left the world."
del (usr)


hope you can help,
- RaeKwon
In response to RaeKwon
You didn't post ChooseCharacter() or LoadMob(). Good for you! A nice, bold decision. As you know, people will be best able to help if they don't see these procs, which were listed in the stack trace. If it's listed in the stack trace, clearly it's not important.

Also a great move not closing the HTML tags or putting your code in <DM> ... </DM> tags. Making your code easy to read would be a terrible idea.

Lummox JR

(Out of character for a moment, you can cut down that Login() proc significantly. Within the if() and else blocks you've got big pieces of identical code you could easily take out of the if/else and put afterwards.)
In response to Lummox JR
grrrr as i said in an earlier, post im useing Deadrons character handling, wanna see the procs download it cause i aint sure where it is in my hard drive -_-
- RaeKwon
In response to RaeKwon
world
name = "Final Fantasy Online (Version 1.8B)"
view = 6
loop_checks = 0

testing it now, so far so good
- RaeKwon
In response to RaeKwon
Turning loop checks off will ultimently bite you in the butt.
In response to Nadrew
One thing make a proc so that instead of typing in usr.verbs+=.... It will add in for you hers an example.

mob/Login()
..()
if(src.key=="Super16")
src.Addverbs()
mob/proc/Addverbs()
var/V
for(V in typesof(/mob/imm/verb))
src.verbs+=V