I have a delete code that doesn't work
Destory(atom/M as mob|obj|turf in world)
Destroy(mob/M as mob|obj|turf)
set category = "GM"
set name = "Destroy"
set desc="(target) Destroy a mobile, object, or turf"
if(M.key)
usr << "You can't destroy Player Corpses. Use ban instead."
return
del(M)
Well it brings up lots of errors. Inconisitint indentation. Could someone tell me a delete code that works please?
~Pat~
ID:148131
![]() Jun 29 2003, 1:49 pm
|
|
No it won't.
mob |
Garthor wrote:
No it won't. Yes, actually, it would. He would just get some runtime errors when he deletes anything but a mob. ~>Volte |
Well the code doesn't work sry to say. Inconsistent indentation still. I tried working with the tabs but it wont work.
|
I make my code anti copy-paste. You should look at the code, and type it. That way you get used to coding. I made that code on the forum. You should be able to follow the indentations there.
Airjoe note: I don't purposely(spelling?) make it copy-paste proof. I just make the code in the forums. When in the forums, if you hit tab, it goes onto the "post" button instead of indenting. Note2: Mods, if you think I should stop doing this, I will. I think I remember an old post from a mod saying that people posting harmful or incorrect code should really stop, and would be punished after ___times. |
Airjoe wrote:
Note2: Mods, if you think I should stop doing this, I will. I think I remember an old post from a mod saying that people posting harmful or incorrect code should really stop, and would be punished after ___times. I think that was only for deliberately harmful code. |
mob/verb/Destroy(atom/A in view())
// if(A:Owner == usr) this is used to check the owner of the atom if(istype(A,/mob/Man)) return else del(A) |
this is a gm verb right? you do realize that any player that joins your game will have it dont you? just because its set in the category gm doesnt mean that only gms will have it. what you need to do is set your gms.
mob/Login() if(src.key=="Siefer") ///then you need to give your gms the gm verbs. src.verbs+=typesof(/mob/GM/verb) ///then make your verbs like this. admin/verb Destroy() If you already knew all of that sorry to waste your time. |
mob/Login() |
my code would cause errors? why? it doesnt on my gm code. if you are refering to the part where it says
Destroy() i was representing that on his delete verb it would really be Destroy() //your delete code goes here |
That should work.
Airjoe