ID:180127
 
alright, i have delcared all my variables like you should.
then i want to use them in a verb like this

obj
Gold
Verb/Process ()
GOLD + 100
del src

and i get the error that the Var is bad. i've checked a milloin times, it's spelled right and declared perfectly, but the debugger doesn't like it, so i try this instead becuase i don't reall understand byond a heck of a lot.

obj
verb

get()
set src in oview(1)
src.Move(usr)
drop()
set src in usr
src.Move(usr.loc)

Process(O as obj)
O:Processing

proc
Processing(O as obj)
if (O == Gold)
GOLD += 100
if (O == Wood)
WOOD += 10
if (O == Clay)
CLAY += 20
if (O == Stone)
STONE += 10
else
usr << "Your can process that!"

so i think this will work good, but it still doesn't like my variables, and i've tryed doing this in lots of different ways, i tryed src, i've tryed obj, nothing likes my variable and nothing works

Vars declared:

mob
var
GOLD

WOOD

STONE

MERCURY

CLAY



errors for given proc:

:78:O :warning: unused label
:78:Processing :warning: unused label
:error:Gold:bad var
83:error:GOLD:bad var
:84:error:Wood:bad var
:85:error:WOOD:bad var
:86:error:Clay:bad var
:87:error:CLAY:bad var
:88:error:Stone:bad var
:89:error:STONE:bad var
Nebathemonk wrote:
alright, i have delcared all my variables like you should.
then i want to use them in a verb like this

obj
Gold
Verb/Process ()
GOLD + 100
del src

and i get the error that the Var is bad. i've checked a milloin times, it's spelled right and declared perfectly, but the debugger doesn't like it, so i try this instead becuase i don't reall understand byond a heck of a lot.

obj
verb

get()
set src in oview(1)
src.Move(usr)
drop()
set src in usr
src.Move(usr.loc)

Process(O as obj)
O:Processing

proc
Processing(O as obj)
if (O == Gold)
GOLD += 100
if (O == Wood)
WOOD += 10
if (O == Clay)
CLAY += 20
if (O == Stone)
STONE += 10
else
usr << "Your can process that!"

so i think this will work good, but it still doesn't like my variables, and i've tryed doing this in lots of different ways, i tryed src, i've tryed obj, nothing likes my variable and nothing works

Vars declared:

mob
var
GOLD

WOOD

STONE

MERCURY

CLAY



errors for given proc:

:78:O :warning: unused label
:78:Processing :warning: unused label
:error:Gold:bad var
83:error:GOLD:bad var
:84:error:Wood:bad var
:85:error:WOOD:bad var
:86:error:Clay:bad var
:87:error:CLAY:bad var
:88:error:Stone:bad var
:89:error:STONE:bad var



What EXACTLY do you want it to do?
Nebathemonk wrote:
alright, i have delcared all my variables like you should.
then i want to use them in a verb like this

obj
Gold
Verb/Process ()
GOLD + 100
del src

and i get the error that the Var is bad.

You declared those variables under "mob", so the object "gold" knows nothing about them, nor does the proc "processing." That is why they are bad.

I can't tell exactly what you want here, but this might help a little:


mob
var
GOLD
WOOD
STONE
MERCURY
CLAY

obj
Gold
Verb/Process()
usr.GOLD + 100
del(src)

This would give you the Process() verb if you had /obj/Gold in your inventory.