mob
icon = 'person.dmi'
var
HP = 30
Login()
bug
icon = 'bug.dmi'
icon_state = gender
..()
I have more of a code but this is where the beggining and error is. I am also new at this i ran ito trouble on a guide. Before i typed in bug and icon = 'bug.dmi' everything was fine but when i put it i tried to compile and i got one error on this line icon_state = gender The error is called "expected a constant expression". What does that mean and how do I fix it?
ID:141968
![]() Sep 24 2008, 12:26 pm
|
|
mob ..() is used for pre-defined procs Example: mob/Move() // override proc And If object O is derived from object P, P is called the parent of O. If a proc (or verb) is defined in both O and P, O can call P's version by using ..(). Also, when you call icon_state, you got to put it like = "(icon state name)". Before you ask for help here, try this here Hope i helped. -Kenobi. |
His problem was actually that his bug code cut into his Login() :P. I think he knew the parent etc. stuff, he's using the ZBT's.
|
From your code, however, it appears you just cut into your login proc and declared something new! You just can't do that; dream maker doesn't know that it's supposed to continue the Login() proc if a new mob is defined in the middle of it. So DM reads your code like this:
and
Two important things you should know:
1) Always keep your indentation consistent, whether your using tabs or spaces. I recommend spaces personally, as it makes the indentation bigger and more noticable.
2) When posting on the forums, put your code in DM tags. A tag is < > where there is something in place of the space. In this case it would be DM. Then, right below your code, you would put </ > where space is the same thing. It tells the BYOND server to give your code a white background and to highlight the verbs, procs, text strings, etc.