ID:263867
 
Code:
mob
Arrancar
verb
mask()
set name = "Arrancar Mask"
set category = "Fighting"
if(usr.safe)
usr << "<b>You are in safe zone!"
return
if(usr.frozen)
return
if(usr.resting)
return
if(!usr.maskon)
usr.maskon = 1
usr.dir = SOUTH
usr.frozen = 1
new/obj/vaion(usr.loc)
sleep(7)
usr.frozen = 0
// if(usr.arrancarmask == "YammyMask")
// usr.overlays += 'YammyMask.dmi'
// if(usr.vaizardmask == "UlquiorraMask")
// usr.overlays += 'UlquiorraMask.dmi'
// if(usr.arrancarmask == "ShawlongMask")
// usr.overlays += 'ShawlongMask.dmi'
// if(usr.arrancarmask == "Deidoro")
// usr.overlays += 'Deidoro.dmi'
// if(usr.arrancarmask == "dordoniimask")
// usr.overlays += 'dordoniimask.dmi'
// if(usr.arrancarmask == "EdoradMask")
// usr.overlays += 'EdoradMask.dmi'
// if(usr.arrancarmask == "EdoradRelease")
// usr.overlays += 'EdoradRelease.dmi'
if(usr.mattack < 3000)
usr.attack += usr.mattack * 2
usr.defence += usr.mdefence * 1.6
goto ger
if(usr.mattack <= 6000)
usr.attack += usr.mattack * 3
usr.defence += usr.mdefence * 2.4
goto ger
if(usr.mattack > 150000)
usr.attack += usr.mattack * 3.7
usr.defence += usr.mdefence * 3
goto ger
ger
sleep(usr.masktime * 10)
if(usr)
usr.random = rand(5,9)
if(usr.random == 1)
usr.masktime += 1
usr.overlays -= 'YammyMask.dmi'
usr.overlays -= 'YammyMask.dmi'
usr.overlays -= 'UlquiorraMask.dmi'
usr.overlays -= 'UlquiorraMask.dmi'
usr.overlays -= 'ShawlongMask.dmi'
usr.overlays -= 'ShawlongMask.dmi'
usr.overlays -= 'Deidoro.dmi'
usr.overlays -= 'Deidoro.dmi'
usr.overlays -= 'EdoradMask.dmi'
usr.overlays -= 'EdoradMask.dmi'
usr.overlays -= 'EdoradRelease.dmi'
usr.overlays -= 'EdoradRelease.dmi'
usr.attack = usr.mattack
usr.defence = usr.mdefence
if(usr)
sleep(150)
usr.maskon = 0

// if(M.random == 1)
// M.arrancarmask = "YammyMask"
// if(M.random == 2)
// M.arrancarmask = "UlquiorraMask"
// if(M.random == 3)
// M.arrancarmask = "ShawlongMask"
// if(M.random == 4)
// M.arrancarmask = "Deidoro"
// if(M.random == 5)
// M.arrancarmask = "dordoniimask"
// if(M.random == 6)
// M.arrancarmask = "EdoradMask"
// if(M.random == 7)
// M.arrancarmask = "EdoradRelease"


Problem description:

Training.dm:746:error:M.random:undefined var
Training.dm:747:error:M.arrancarmask:undefined var
Training.dm:748:error:M.random:undefined var
Training.dm:749:error:M.arrancarmask:undefined var
Training.dm:750:error:M.random:undefined var
Training.dm:751:error:M.arrancarmask:undefined var
Training.dm:752:error:M.random:undefined var
Training.dm:753:error:M.arrancarmask:undefined var
Training.dm:754:error:M.random:undefined var
Training.dm:755:error:M.arrancarmask:undefined var
Training.dm:756:error:M.random:undefined var
Training.dm:757:error:M.arrancarmask:undefined var
Training.dm:758:error:M.random:undefined var
Training.dm:759:error:M.arrancarmask:undefined var
Training.dm:696:error:usr.arrancarmask:undefined var
Training.dm:700:error:usr.arrancarmask:undefined var
Training.dm:702:error:usr.arrancarmask:undefined var
Training.dm:704:error:usr.arrancarmask:undefined var
Training.dm:706:error:usr.arrancarmask:undefined var
Training.dm:708:error:usr.arrancarmask:undefined var

This is the EXACT error. and the EXACT code

Those gotos are horrible. You should not be using them. I recommend you look up the else statement.

I fail to see how M.random could be giving you problems in this code, though, since any line that includes it is totally commented out.

Lummox JR
In response to Lummox JR
Its only marked out because it was causing errors and I had other stuff to work on at the time. So, I got rid of it for now but, now im back to this part. -.-

EDIT: Sorry I copied the code from it after i canceled out that part not realizing it.
If this is your exact code, I see your problem.

M is not defined in this verb. Considering this is the second time you have shown us this code, I have the feeling that arcannamask is not a defined variable on the mob either?
In response to Zuglilth
Zuglilth wrote:
If this is your exact code, I see your problem.

M is not defined in this verb.

ooh OK. Thanks. (now for stupid question) How i Define it? (im still learning coding) (sorry)
In response to King killer 113711
That depends entirely what M is supposed to be. Is M the mob using the verb? The mob that the verb is used on?

Also, arcannamask comes up undefined. Can you post your mobs variables so I can see if arcannamask even exist?
In response to Zuglilth
Zuglilth wrote:
That depends entirely what M is supposed to be. Is M the mob using the verb? The mob that the verb is used on?

Also, arcannamask comes up undefined. Can you post your mobs variables so I can see if arcannamask even exist?

M would be the Mob using he verb. So using the Verb would add the overlay of the mask on them.

&&

Dont I have them posted a few spaces down before the end of the code?
In response to King killer 113711
Well, then just make M. into usr. since this is a verb.

As for your second question: No, you didnt.

When you are changing variables on a mob (in this case, the usr) you need to make sure that usr actually has the variable in question. The fact you don't know this, and the seeing the verb interacts with other variables leads me to one conclusion...

You stole the code you are working on, and I think the owner of the code would be really pissed off if I helped you deface his hard work.
In response to Zuglilth
A. Friends code
B. Full Premission to use
C. Trying to LEARN to code so i dont know alot yet. thanks and all but please dont accuse me of stuff if you dont know for sure.
In response to King killer 113711
A. Please have your friend confirm that for me.
B. Same as the first.
C. You should probably learn with the DM Guide
<---Link is right over there.
In response to King killer 113711
You don't learn by taking poorly-written code and modifying it. You learn by following GOOD TUTORIALS.