ID:262171
 
Alright, here is a snippet i need someone to look at

if(src.race == "Henchman")
src.loc = locate(0,0,0)
usr.random = rand(1,5)
for(var/mob/Princess in world)
del(/mob/Princess)
global.SaveP = 0
global.SaveP2 = 1
SagaCheck2()
new /mob/Princess(locate(130,15,2))
new /mob/monsters/Henchman2(locate(128,15,2))
if(usr.random == 5)
usr << "<b>You get 400 gold from that kill!</b>"
usr.gold += 400
usr << "<b>You get 200 Experience form that kill!</b>"
usr.exp += 200
usr.LevelUp()
else
usr << "<b>You get 200 gold from that kill!</b>"
usr.gold += 200
usr << "<b>You get 100 experience from that kill!</b>"
usr.exp += 100


usr.LevelUp()

This is defined under my death proc. What i am trying to do is when this certain monster dies it deletes another mob in the world (her the princess). When i compile it turns no errors but at runtime when i kill the henchmen i get a runtime error that says:
runtime error: bad del
proc name: Die (/mob/proc/Die)
source file: battle System.dm,179
usr: Nero (/mob/characters/Warrior)
src: Henchman (/mob/monsters/Henchman)
call stack:
Henchman (/mob/monsters/Henchman): Die()
Nero (/mob/characters/Warrior): Finish(Henchman (/mob/monsters/Henchman))
I would appreciate any help, thanks in advance.
                        for(var/mob/Princess in world)
del(/mob/Princess)


I think that's your problem. If Princess is a type of mob, put another / after var/mob/Princess, and put M in world, so for(var/mob/Princess/M in world), or replace M with whatever you want to name the var, thne do del(M) (or your var)
In response to Lenox
ahh! thanks alot, i never would have thoguht of that with my tiny brain :P
In response to Zero's Baby
Well, using del on (mob/Princess) wouldn't do anything, anyways. That's probably why it produced a runtime. But, del((Your Var Here)) will disconnect the users.