ID:141219
 
ya I used spunkygirl's code for my saving/loading and it's been working perfectly: http://www.byond.com/developer/forum/?id=699653

but then I added spells people get in their inventory and all kinds of stuff, and now this happens every time I host:



runtime error: Maximum recursion level reached (perhaps there is an infinite loop)

To avoid this safety check, set world.loop_checks=0.

proc

name: Write

(/mob/Write)



usr:

Revert (/mob/spells/Revert)



src:

Revert (/mob/spells/Revert)



call stack:

Revert (/mob/spells/Revert)

:

Write(

Savefiles/breakmandx.sav (/savefile)

)

Shadow (/mob/spells/Shadow)

:

Write(

Savefiles/breakmandx.sav (/savefile)

)

Hyper (/mob/spells/Hyper)

:

Write(

Savefiles/breakmandx.sav (/savefile)

)

Revert (/mob/spells/Revert)

:

Write(

Savefiles/breakmandx.sav (/savefile)

)

Shadow (/mob/spells/Shadow)

:

Write(

Savefiles/breakmandx.sav (/savefile)

)

Hyper (/mob/spells/Hyper)

:

Write(

Savefiles/breakmandx.sav (/savefile)

)

Revert (/mob/spells/Revert)

:

Write(

Savefiles/breakmandx.sav (/savefile)

)

Shadow (/mob/spells/Shadow)

:

Write(

Savefiles/breakmandx.sav (/savefile)
proc

name: Write

(/mob/Write)



Shutting down after encountering too many critical errors.

runtime error: Maximum recursion level reached (perhaps there is an infinite loop)

To avoid this safety check, set world.loop_checks=0.

proc

name: Write

(/mob/Write)



Shutting down after encountering too many critical errors.

runtime error: Maximum recursion level reached (perhaps there is an infinite loop)

To avoid this safety check, set world.loop_checks=0.

proc

name: Write

(/mob/Write)



Shutting down after encountering too many critical errors.

runtime error: Maximum recursion level reached (perhaps there is an infinite loop)

To avoid this safety check, set world.loop_checks=0.

proc

name: Write

(/mob/Write)




Shutting down after encountering too many critical errors.

Connection failed.

Post your Revert and Hyper spells.
And next time, don't fill a post like this. It's unnecessary, since all you really needed to post was two or three runtimes.
Holy spamaroni! Edit that post and remove all that crap, man (leave only a couple of the errors). Even if someone still tried to help you, he may only be able to get around to doing it in a few weeks because he's scrolling down the page... O_o
well now I don't get spammed that instantly and then crash,

but I still get these ALL THE TIME =(:

(Title Screen) Damie904 has left...
proc name: Savee (/mob/proc/Savee)
usr: Saga (/mob)
src: Saga (/mob)
call stack:
Saga (/mob): Savee()
Saga (/mob): music()
Saga (/mob): music()
TrainerAbu: gawd I'm very slowly getting spammed with lots of errors wish they didn't show up for me at least oh well
proc name: Savee (/mob/proc/Savee)
usr: TrainerAbu (/mob)
src: TrainerAbu (/mob)
call stack:
TrainerAbu (/mob): Savee()
TrainerAbu (/mob): music()
TrainerAbu (/mob): music()
proc name: Savee (/mob/proc/Savee)
usr: TrainerAbu (/mob)
src: TrainerAbu (/mob)
call stack:
TrainerAbu (/mob): Savee()
TrainerAbu (/mob): music()
TrainerAbu (/mob): music()
proc name: Savee (/mob/proc/Savee)
usr: Nabutso (/mob)
src: Nabutso (/mob)
call stack:
Nabutso (/mob): Savee()
Nabutso (/mob): music()
Nabutso (/mob): music()

and then after awhile it stops and I just get this over and over:

proc name: Savee (/mob/proc/Savee)
Saga: and make theee new game continue yosh mad bold kewl lettering instead of cursive
Saga: and ya
proc name: Savee (/mob/proc/Savee)
proc name: Savee (/mob/proc/Savee)
proc name: Savee (/mob/proc/Savee)


I'll post the music() proc:

mob/proc/music()
if(usr.z > 0 && usr.z < 12 && usr.isperson == 1)
usr.Savee()
usr.RPname = rand(1,13)
if(usr.RPname == 1)
winset(usr,"Tip","text=Eating%20Seeds%20have%20a%20rare%201%20out%20of%2010%20chance%20of%20increasing%20your%20Maximum%20HP%20or%20Initial%20HP.")
if(usr.RPname == 2)
winset(usr,"Tip","text=You'll%20receive%20a%20BYOND%20Medal%20if%20you%20do%20the%20tutorial%20on%20the%20Title%20Screen at any time.")
if(usr.RPname == 3)
winset(usr,"Tip","text=You%20can%20fuse%20with%20someone%20else.%20%20You%20can%20pick%20your%20fused%20name%20and%20you'll%20both%20control%20and%20battle%20using%20the%20same%20character.")
if(usr.RPname == 4)
winset(usr,"Tip","text=Increase%20Vitality%20to%20increase%20your%20Initial%20HP.%20%20Once%20you%20reach%2010%20Vitality,%20your%20Initial%20HP%20will%20always%20be%20equal%20to%20your%20Max%20HP.")
if(usr.RPname == 5)
winset(usr,"Tip","text=Every%20time%20your%20Level%20is%20a%20multiple%20of%203,%20and%20every%20time%20your%20Agility%20is%20a%20multiple%20of%205,%20your%20attack%20speed%20increases,%20allowing%20you%20to%20punch%20faster.")
if(usr.RPname == 6)
winset(usr,"Tip","text=Every%2050%20seconds,%20AKA%20every%20time%20this%20random%20tip%20changes,%20the%20game%20is%20auto-saving%20your%20progress%20for%20you.")
if(usr.RPname == 7)
winset(usr,"Tip","text=12%20str%20and%203%20dex%20would%20be%205%20minimum%20damage%20and%2013%20maximum%20damage.%20%20With%2012%20str%20and%207%20dex,%20you'd%20have%2011%20minimum%20and%2013%20maximum.")
if(usr.RPname == 8)
winset(usr,"Tip","text=You%20can%20do%20a%20Critical%20hit%20with%203%20Luck,%20a%20Super%20Crit%20with%208%20Luck,%20a%20Special%20Crit%20with%2015%20Luck,%20and%20a%20Deathblow%20Hit%20with%2020%20Luck.")
if(usr.RPname == 9)
winset(usr,"Tip","text=You%20can%20use%20the%20Customize%20button%20or%20Customize%20chat%20command%20to%20pick%20your%20chatting%20colors%20from%20a%20huge%20color%20palette.")
if(usr.RPname == 10)
winset(usr,"Tip","text=You%20can%20play%20Laser%20Tag%20in%20the%20Portal%20that's%20outside%20of%20the%20clubhouse.")
if(usr.RPname == 11)
winset(usr,"Tip","text=You%20can%20Race%20other%20players.%20%20Memorize%20where%20to%20go,%20they%20can%20be%20fast!")
if(usr.RPname == 12)
winset(usr,"Tip","text=You%20can%20battle%20special%20hamsters%20and%20monsters%20if%20you%20talk%20to%20MartialArtistAbu%20in%20the%20tree%20that's%20outside.")
if(usr.RPname == 13)
winset(usr,"Tip","text=Donate%20Coins%20to%20Angel%20Ham%20to%20win%20stat%20boosts,%20level%20ups,%20a%20lot%20of%20coins,%20and%20more.%20%20Donate%20more%20at%20a%20time%20for%20a%20higher%20chance.")
if(usr.fused == 1)
usr.MP = (usr.MP - 1)
usr.Obama++
if(Obama == 10 && (world.GetMedal("Quality Time",usr) != 1))
world << sound('happy_birthday.wav')
world << "<B><font color=blue>User <FONT COLOR = olive>[usr]<font color=blue> has earned the <FONT COLOR = olive>Quality Time Medal!"
world.SetMedal("Quality Time",usr)
world.SetMedal("Quality Time",usr:fusedwith)
if(MP == 0)
world << "<B><FONT COLOR=AQUA>[usr.fusedname] Defuses, as [usr.key] lost all his MP!"
usr.name = usr.key
usr:fusedwith:name = usr:fusedwith:key
usr.fused = 0
usr.move = 1
usr:fusedwith:move = 1
usr.density = 1
usr:fusedwith:density = 1
usr.x -= 1
usr:fusedwith:x += 1
usr:fusedwith:fused = 0
usr:fusedwith:icon = usr:fusedwith:iicon
usr.icon=usr.iicon
usr.underlays -='SSJAura.dmi'
usr:fusedwith:underlays -='SSJAura.dmi'
usr.name=usr.iname
usr:fusedwith:name=usr:fusedwith:iname
usr.HP -= 5
usr.maxHP -= 5
usr.initialHP -= 5
usr:fusedwith:HP -= 5
usr:fusedwith:maxHP -= 5
usr:fusedwith:initialHP -= 5
if(M:SSJ == 1)
usr.icon = usr.iicon
usr.underlays -= 'SSJAura.dmi'
usr.str += 2
usr.vit -= 2
usr.maxHP -= 5
usr.initialHP -= 5
usr.maxMP -= 5
usr.SSJ = 0
usr:fusedwith:underlays -= 'SSJAura.dmi'
usr:fusedwith:str += 2
usr:fusedwith:vit -= 2
usr:fusedwith:maxHP -= 5
usr:fusedwith:initialHP -= 5
usr:fusedwith:maxMP -= 5
usr:fusedwith:SSJ = 0
if(usr.hasSSJ == 1)
else
usr:verbs -= /mob/commands/verb/Revert
usr:fusedwith:fusedwith = null
usr.fusedwith = null

spawn(500)
music()


help please =(
In response to MartialArtistAbu
Oh my GOD.

usr, : abuse, booleans wrongly if'd, ...

All that, and you even showed us the wrong proc! Show Savee() please.
In response to Mysame
lol everyone freaks out when I post my code here, I'm a noob at clean DM.

Anyways, here:

mob/proc
Savee()
usr.update = 116
var/index = "Savefiles/[src.ckey].sav"
if(fexists(index)) fdel(index)
var/savefile/s = new(index)
src.Write(s)
In response to MartialArtistAbu
What I'm about to show you wont solve your problem, but it'll improve your programming practices a lot.

For starters, the first thing about your script is your method of doing those tips. %20 is completely unnecessary. To stop the winset() from messing with text, all you need to do is encase your text in escaped quotation marks, like so:
winset(src, "Tip", "text=\"This is a standard text string.\"")


You'll note that's much cleaner and far easier for you to read.

As for your method of tips themselves, the logic your using is flawed and unnecessarily complicated. Every time you add a tip, you have to update that rand() and add another if() statement. This is complicated and painful, and no doubt frustrating to you. How about we improve it, so all you have to do is just add the tip?

First things first, remove all of that tip stuff, and put all the tips into a list, which I have taken the liberty of doing for you:
var/list/Tips = list(
"Eating Seeds have a rare 1 out of 10 chance of increasing your Maximum HP or Initial HP.",
"You'll receive a BYOND Medal if you do the tutorial on the Title Screen at any time.",
"You can fuse with someone else. You can pick your fused name and you'll both control and battle using the same character.",
"Increase Vitality to increase your Initial HP. Once you reach 10 Vitality, your Initial HP will always be equal to your Max HP.",
"Every time your Level is a multiple of 3, and every time your Agility is a multiple of 5, your attack speed increases, allowing you to punch faster.",
"Every 50 seconds, AKA every time this random tip changes, the game is auto-saving your progress for you.",
"12 str and 3 dex would be 5 minimum damage and 13 maximum damage. With 12 str and 7 dex, you'd have 11 minimum and 13 maximum.",
"You can do a Critical hit with 3 Luck, a Super Crit with 8 Luck, a Special Crit with 15 Luck, and a Deathblow Hit with 20 Luck.",
"You can use the Customize button or Customize chat command to pick your chatting colors from a huge color palette.",
"You can play Laser Tag in the Portal that's outside of the clubhouse.",
"You can Race other players. Memorize where to go, they can be fast!",
"You can battle special hamsters and monsters if you talk to MartialArtistAbu in the tree that's outside.",
"Donate Coins to Angel Ham to win stat boosts, level ups, a lot of coins, and more. Donate more at a time for a higher chance.",
"Tiberath is the bestest most super awesome person in the world!"
)


That's much easier to read. Now, we're going to use the length of that list as a max and 1 as a minimum in order to find out which tip we're going to use.

winset(src, "Top", "text=\"[Tips[rand(1, Tips.len)]]\"")


We've now replaced 27 lines of code with 16. (Unless you count the list as a single line of code, in which case, it's now 2. Neat, eh?)

The whole thing should look like this:
var/list/Tips = list(
"Eating Seeds have a rare 1 out of 10 chance of increasing your Maximum HP or Initial HP.",
"You'll receive a BYOND Medal if you do the tutorial on the Title Screen at any time.",
"You can fuse with someone else. You can pick your fused name and you'll both control and battle using the same character.",
"Increase Vitality to increase your Initial HP. Once you reach 10 Vitality, your Initial HP will always be equal to your Max HP.",
"Every time your Level is a multiple of 3, and every time your Agility is a multiple of 5, your attack speed increases, allowing you to punch faster.",
"Every 50 seconds, AKA every time this random tip changes, the game is auto-saving your progress for you.",
"12 str and 3 dex would be 5 minimum damage and 13 maximum damage. With 12 str and 7 dex, you'd have 11 minimum and 13 maximum.",
"You can do a Critical hit with 3 Luck, a Super Crit with 8 Luck, a Special Crit with 15 Luck, and a Deathblow Hit with 20 Luck.",
"You can use the Customize button or Customize chat command to pick your chatting colors from a huge color palette.",
"You can play Laser Tag in the Portal that's outside of the clubhouse.",
"You can Race other players. Memorize where to go, they can be fast!",
"You can battle special hamsters and monsters if you talk to MartialArtistAbu in the tree that's outside.",
"Donate Coins to Angel Ham to win stat boosts, level ups, a lot of coins, and more. Donate more at a time for a higher chance.",
"Tiberath is the bestest most super awesome person in the world!"
)

mob
var
isperson = TRUE // What could this variable possibly be used for...?
RPName = 0 // Same with this variable.

proc
music()
if((src.z < 12) && src.isperson) src.Savee()
winset(src, "Top", "text=\"[Tips[rand(1, Tips.len)]]\"")
// The rest of your poc I haven't touched yet.

// I don't know what this proc consists of, so I'm just putting this here as a placeholder.
Savee()
return FALSE


Much less code now, and all you have to do to add another tip is simply add it too the list. Quick, simple, easy and efficient. You'll also note I've changed the opening if() statement a little. The z-level always exists (even if it exists as zero), with that in mind, the check is now to see if the z-level is less than 12.




Now onto the rest of this code... I simply have no idea what you're doing here. The colon operator is bad practice and can lead to easy breaks in your code down the line. Reply in detail with what you're attempting to do here, hopefully myself or someone else can help you with your desired plan (though we probably wont give you answers, just the means to find answers).
In response to Tiberath
Wow, thanks a lot~!

In my eyes, I have to use the colons in these cases. I use them when this happens when I use periods instead:

"NewStart.dm:943:error:usr.fusedwith.name:undefined var"

but if I use colons, I don't get that error and it ends up working.

What I'm doing there has to do with my fuse verb, which makes it so 2 people can become 1 person. (That fusedwith variable is set to refer to the user they're fused with.) They're then able to move as the same character and have 1 name called their fused name. It's always worked before and still does, so yeah.

The part with the Obama variable and medal just has to do with a medal I have in my game that the user gets if they've spent 10 MP being fused with someone else.

And the savee proc ya said you don't know what it consists of is in this reply: http://www.byond.com/developer/forum/?id=699912 apparently that's the one that gives me errors in the game when other people join when the game auto-saves every 50 seconds using that music proc.

But yeah =3.
In response to MartialArtistAbu
If you need to use the colon for something to work, you know you're doing something wrong.

In your case, it's because the "fusedwith" variable isn't defined to be a mob.

So you've gotta make it;
mob/var/mob/fusedwith


This is often used with projectiles, to set the "owner", the user, the person who fired it.

obj/var/mob/owner
In response to Mysame
Holy Gonzolie (dunno I just made up that word now) that actually makes it work with periods now, thanks :3.

Now I just need the savee proc problem fixed =( http://www.byond.com/developer/forum/?id=699912

but ya. Yosh =3
In response to MartialArtistAbu
So the error happens when another player joins? o.O; Meh.

Try making the spawn(500) a sleep(500), because, besides the code still being massive, I can't find anything that points to a loop.
In response to Mysame
wellzz

I found out what happened in the first post and fixed it so that the loop errors stopped, but then http://www.byond.com/developer/forum/?id=699840 that happened instead.

When people's music procs happen, I'd get this:

proc name: Savee (/mob/proc/Savee)
usr: Saga (/mob)
src: Saga (/mob)
call stack:
Saga (/mob): Savee()
Saga (/mob): music()
Saga (/mob): music()

Saga being whatever their name in the game would be.

Then, after awhile, the errors would change to just saying this:

proc name: Savee (/mob/proc/Savee)

and it'd appear whenever their music proc auto-saves them by using the Savee proc, and I think also when they hit the Save verb themselves which also loads the Savee proc.

Oh, and I just tried changing spawn to sleep and I can't get it to work right but yaaa
In response to MartialArtistAbu
Well, dunno if you're still using 'usr' in the proc, but that's definitely bad. Use 'src' or arguments.
Also, in your DM's preferences, you can enable it to show the error line in the runtime error. Would be helpful, huh.
In response to MartialArtistAbu
Throw:
#define DEBUG

up the top of any one of your code files. Then return with the error you're having.