No Topic in Developer Help
|
|
Code:
obj health1 if(hpbar=="grey") icon='health bar base grey.dmi' icon_state="1" if(hpbar=="red") icon='health bar base red.dmi' icon_state="1" if(hpbar=="blue") icon='health bar base blue.dmi' icon_state="1" layer=5 New(client/C) screen_loc="1,15" C.screen+=src
|
and
atom/var hpbar="grey" list/editobj=list("Bars"=list("Health"=list("Grey","Red","Blue"),"Mana"=list("Grey","Red","Blue")))
mob host verb Edit() var/editing=input("What do you want to edit?")as null|anything in editobj if(!editing) usr<<"you dont edit anything" if(editing=="Bars") var/editing2=input("What do you want to edit?")as null|anything in "Bars" if(editing2=="Health") var/editing3=input("What color you want?")as null|anything in "Health" if(editing3=="Grey") hpbar="grey" if(editing3=="Red") hpbar="red" if(editing3=="Blue") hpbar="blue"
|
Problem description:
when i try to compile i get 12 duplicate definition and 3 instruction is not alowed here errors(all in upper code). i wanted to make host able to change hp bar color but it didn't work. please help. thank you
|
In your second snippet, the editobj list really needs to be global. And for the input, "in "Health"" should be "in editobj["Health"]". Same with "in "Bars"".