ID:146329
 
obj gold icon = 'person.dmi' icon_state = "gold" var amount verb get() //obj/gold/verb/get() set src in view(1) usr << "You pick up [amount] gold." usr.wealth += amount del(src)



Problem description:
1.I got most of this from a tutorial, and on the end it says; "Things you can try doing now:
- Make a var for wealth"

This is where i'm stuck, because i have no clue at all where to begin..


obj Tree icon = 'person.dmi' icon_state = "tree" density = 1 verb/kick() usr.lvlcheck() usr.exp+=rand(1,2)

2. How do i make a level up system from scratch?
Level up;

mob/proc/LvlUp()
if(src.exp >= src.Mexp)
src.Lvl += 1
src.Mexp*=2
src.exp = 0
src << "<b><small>You've gained a level!</b></small>
//Add in the other stats it'll lvl.


Gold;

I don't think your defining the var/amount, if i'm not mistaken your leaving the var blank. Wich would mean that the player wouldn't gain any amount of money.

--Chwgt
In response to Chwgt
Yeah, and I also have a blank exp var, just because I dont know how to even start writing it..

tut.dm:125: Inconsistent indentation.
tut.dm:126: Inconsistent indentation.
tut.dm:130: Inconsistent indentation.
tut.dm:131: Inconsistent indentation.
tut.dm:132: Inconsistent indentation.
tut.dm:133: Inconsistent indentation.
tut.dm:134: Inconsistent indentation.
tut.dm:135: Inconsistent indentation.
tut.dm:136: Inconsistent indentation.

It gives an error on almost every line that has anything to do with leveling up

EDIT: Now I also find out i need a var for Get() and Drop() command :|
In response to Mysame
Your not supposed to copy and paste the code x.x. Make sure it's all tabbed right and you won't get the inconsistent indentation errors.

--Chwgt
In response to Chwgt
Thanks a bunch, but it still needs to variables to work >.<

tut.dm:189:error:g.amount:undefined var
tut.dm:184:error:usr.wealth:undefined var
tut.dm:166:error:src.Lvl:undefined var
tut.dm:167:error:src.Mexp:undefined var
tut.dm:168:error:src.exp:undefined var
tut.dm:170:error:src.Drop():undefined var
tut.dm:171:error:src.Get():undefined var
In response to Mysame
atom/movable
mob/var
exp = 0
Mexp = 100
lvl = 1
wealth = 0



//Insert this into your amount var
var/amount = rand(1,50)
that should deal with alot of your errors, also make sure your get() proc is the same capitilization as the actual proc if it is Get() and the other get() your going to get an error