DeathCheck()
if (HP <= 0)
world << "[src] dies!"
del(src) //delete whatever just died
Problem description:
in this area on the line with
if (HP <= 0)
it keeps saying
Proc definition not allowed inside another proc. I dont understand what it means
ID:141763
![]() Nov 16 2008, 2:51 pm
|
|
Code:
DeathCheck() Problem description: in this area on the line with if (HP <= 0) it keeps saying Proc definition not allowed inside another proc. I dont understand what it means |
![]() Nov 16 2008, 2:54 pm
|
|
Learn how to indent, your indentation is incorrect.
|
This error is a bit vague, in this context. It most likely means either your DeathCheck() is indented too far, or the if() and its two lines aren't indented enough. Probably the former. Try:
DeathCheck() |
Everything must be under what it is defined under. For example, if you want to change mob/Login(), you indent Login() under mob. Then, if you want to make it do things, you place the commands for those things underneath Login().
Let's say you want to define a new type under /mob. You would put it under mob, and then follow the above. mob |
Code:
Login() now in that area im having the same problem where it says icon_state = gender |
Did you even read what I said? I said everything must be indented below what you want it to belong to. Therefore you have to indent icon_state = gender and ..() one more tab.
|
Code:
Login() Problem description: is that right cause if it is I still have the problem |
Try posting the whole block of code so we can see what's actually above Login(), or what block it belongs to.
Also, the <DM> tag has a small bug with indentation that can make it more confusing when you're posting code on the forums. It only happens on the first line though, so you can easily avoid it - just make sure to post your code like this: Code (NOT this:) Code Just don't use the first line after the tag. |
Code:
#define DEBUG Problem description: ok thats my whole code so if you can help me plz help |