Problems with else proc in Developer Help
|
|
Code:
obj/Ale icon='Bar.dmi' icon_state="ale" verb/Drink() set src in usr if(usr.MP<500) usr.MP=usr.MaxMP usr << "Already at max energy." else usr.MP+=35 usr <<"You drink the [src] and gain 35 Energy" del src
obj/Whisky icon='Bar.dmi' icon_state="whisky" verb/Drink() set src in usr if(usr.MP<500) usr.MP=usr.MaxMP else usr << "Already at max energy." usr.MP+=100 usr <<"You drink the [src] and gain 100 MP " del src
obj/Pie icon='Bar.dmi' icon_state="pie" verb/Eat() set src in usr if(usr.HP<500) usr.HP=usr.MaxHP else usr << "Already at max health." usr.HP+=50 usr <<"You eat the [src] and gain 50 Health" del src
obj/Beer icon='Bar.dmi' icon_state="beer" verb/Drink() set src in usr if(usr.MP<500) usr.MP=usr.MaxMP usr << "Already at max energy." else usr.MP+=50 usr <<"You drink the [src] and gain 50 Energy" del src
|
Problem description:
Every time I use the else proc,the code gets a bunch of errors.
|
Example:
If you want to use it for that other if proc you have there, just indent them.