ID:159464
 
I have a problem with the new medals and i dont know if its just me or what but when some1 gets the medal the game crashes

if any1 has any idea what is happening pls tell me cause this is beginning to be a problem


-First Medal is for Starting a new Game Crashes

-Kill Madara is for killing a NPC

-Betrayal is for leaving village

-Legendary is for Reaching rank of kage

they all make game crash sooner or later onece it is unlocked


mob
proc
First_Medal()
world.SetMedal("And So It Begins....", usr)
usr<<"<b><FONT SIZE = -1><Font color=blue>Achievement Unlocked: And So It Begins...."
Kill_Madara()
world.SetMedal("Uchiha Legacy", usr)
usr<<"<b><FONT SIZE = -1><Font color=blue>Achievement Unlocked: Uchiha Legacy"
Betrayal()
world.SetMedal("Betrayal", usr)
usr<<"<b><FONT SIZE = -1><Font color=blue>Achievement Unlocked: Betrayal"
Kage_Medal()
world.SetMedal("Legendary", usr)
usr<<"<b><FONT SIZE = -1><Font color=blue>Achievement Unlocked: Legendary"




That does sound pretty bad. Are you getting any technical info from the crash, like which module it happened in or at which memory address?

Lummox JR
Maybe it's because you're using usr in a proc. It's possible that the staff forgot to check if the second argument is a valid object. It's also possible that staff forgot to check whether a mob has a client, etc.
In response to Lummox JR
this is what my Host gets when he host the game and tries to get the first medal


TrueTruth (/mob): First Medal()
START (3,1,20) (/turf/START): Click(START (3,1,20) (/turf/START), "MainWindow.MapMain", "icon-x=20;icon-y=19;left=1;scr...")
proc name: First Medal (/mob/proc/First_Medal)
source file: Naruto.dm,1008
usr: TrueTruth (/mob)
src: TrueTruth (/mob)
call stack:
Garritte says:
TrueTruth (/mob): First Medal()
START (3,1,20) (/turf/START): Click(START (3,1,20) (/turf/START), "MainWindow.MapMain", "icon-x=20;icon-y=19;left=1;scr...")
proc name: First Medal (/mob/proc/First_Medal)
source file: Naruto.dm,1008
usr: TrueTruth (/mob)
src: TrueTruth (/mob)
call stack:
In response to Dbar910
When you say it crashes, do you mean the program closes? I think you might gotten your terminology wrong.

Chances are, you're calling SetMedal() with an invalid second argument. Make sure the mob has a client before calling SetMedal(), and see if that helps.
In response to Jeff8500
Im kinda new to programming but when some1 gets the medal it closes the program completly

but could u give an example of what ur talkin about
In response to Dbar910
mob/proc/Get_medal()
if(client) //this makes sure they are a player
SetMedal(/*whatever you put here*/)
//whatever you put here
In response to Jeff8500
so all i need to do is add this to my current code and it will all be ste

**Note**
It dosent crash on me when im testin in dream maker just when i upload to shell server