ID:959569
 
Keywords: errors, evolution, hollow
(See the best response by NNAAAAHH.)
I get tons of errors when i try to add this to my code.



Code:
mob/verb/Evolution()


mob/proc/level()
if(src.level==10)



Can anyone tell me what im doing wrong, what im trying to do is make a hollow evolution system.
Without knowing what the errors are, it's hard to say what's wrong. Could you tell us what errors you're receiving?
Coding\Main.dm:418:error: src.level: undefined var

sorry should have added this first thats the only one now i fix wat caused all the others.
Best response
Do you have the variable defined?
mob/var/level=1

[EDIT] As LordAndrew stated before I rudely posted before his answer, Chapter 5 of the DM Guide explains variables. [END EDIT]
OK i have it defined like this

  mob/verb/Evolution()
var/level=10



and now it needs to be used what do i do to make it used

[Edit] i need a proc right [End Edit]
In response to Copycat111
You have the variable defined inside a verb, it can only be used inside that verb. You have to define it outside of a verb or proc to use it for anything more. And you would want to define it as a mob variable so only mobs hold levels. Once you do that, you can increase the level variable, which is just a num, and read the variable whenever you so choose.