ID:261807
 
Uhm, hey.. I just started trying to learn coding, and, uh, I was using this dude's tutorial:

http://zilal.byond.com/tutorials/zbt.html

And I'm at the end of it, where it tells you to do the get() verb to get the gold the "bugs" drop. And, to my knowledge, my coding has been exactly right, but I get this error when I try to compile:

Testworld.dm:57:error:usr.wealth:undefined var

And this is the line that has the error:

usr.wealth += amount //add to usr.wealth

Now, I'm not sure if you need more info than just that line, I'm guessing you do, but I'm not sure. If so, I'll be more than happy to give more. But, uh, I'd really appreciate any help. Thanks.
You have to define the variable somewhere..mob/var/wealth
Rockin' Eli wrote:
Uhm, hey.. I just started trying to learn coding, and, uh, I was using this dude's tutorial:

http://zilal.byond.com/tutorials/zbt.html

Just FYI: "That dude" is female, actually. =) http://developer.byond.com/people/zilal