obj/Pokeball
icon='pokeball.dmi'
name="Pokeball x[usr.pokeballs]"
verb
PickUp()
set src in oview(1)
usr.contents3 += src
src.loc = null
mob
pokemon
Stat()
statpanel("Inventory","-----Pokemon-----","")
statpanel("Inventory",contents2)
statpanel("Inventory","-----Items-----","")
statpanel("Inventory",contents3)
Problem description:
Well, it says undefined var for usr.pokeballs and expected a constant expression. Obviously, at first glance, you'd think to just put it after contents3, (which is where I want it obviously).. But if I put
statpanel("Inventory",contents3,"[pokeballs]")
When you are first setting a variable, you can NOT reference other variables. That's called not being constant, and its not possible. You have to set it to something solid.
You would accomplish what you want like this:
However, from what we can see it doesn't appear that your code stacks the pokeballs, so I don't know what the purpose of that would be...