ID:141647
 
Code:
mob
Demi_Hollow
icon = 'mobs.dmi'
icon_state = "demi"
walk_rand(Demi_Hollow)
verb
Attack()
set src in oview(1)
Attacking()
Dead()


Problem description:

I get the following error when compiling:
mobs.dm:33:error:Demi_Hollow:value not allowed here

Please help, thanks!
It helps to tell us which line is highlighted...

But from just looking at it, you can't have the walk_rand() there. You'd need to put that inside a New() proc.

mob/Demi_Hollow
//...
New()
..()
spawn() walk_rand(src)
In response to Mizukouken Ketsu
Note: You don't need spawn(), because all the walking procs return immediately after they're called (you could say they use spawn() themselves).
In response to Kaioken
Ah.. Sorry, it's habit :\

Oh and another note. That walk_rank() function will conflict with any other walk/step functions. I'd recommend putting it into a while() loop so that when you change the variable being tested in the while() condition, it will discontinue the walk_rank() function.
In response to Mizukouken Ketsu
,> Well, not quite. A walk function on an object halts any previous walk function on it, though step functions don't interfere with 'em. And there's no need to loop walking functions and it'd be pretty silly to, as they continue on automatically after being called once. To cancel a walking function you call any walking function on the same object, but give it some invalid arguments so it doesn't start new walking after canceling the current. Most commonly walk(Object,0).
In response to Kaioken
So what if you wanted to transist from a walk function to a looped step function? How would you cancel out the walk function so the step function will work?
In response to Mizukouken Ketsu
Mizukouken Ketsu wrote:
How would you cancel out the walk function so the step function will work?

A step function will still work with a walking function running in the background. Both will execute, so it just results in more movements taking place. As for canceling a walking function, I've already outlined the method to do that in my previous post. =P
In response to Kaioken
Oh that's what that was for x.x walk(Object,0)

Would using null in place of zero work? They do mean the same thing to the compiler :3 I just prefer using null or FALSE for values that don't involve numbers. Less confusing when reading it ^-^
In response to Mizukouken Ketsu
Mizukouken Ketsu wrote:
Would using null in place of zero work?

Yeah, it would. It just needs to be a value that isn't a valid direction.

They do mean the same thing to the compiler :3

Not really. >_>

I just prefer using null or FALSE for values that don't involve numbers.

FALSE is just another name for 0. It's a constant variable set to it. <_<
In response to Kaioken
variables* Not values >.<
In response to Mizukouken Ketsu
Elaborate. ;P
In response to Kaioken
If I read all my variables as being either 1 (true) or 0 (false), I'd go nuts, even though that's how a computer reads >_>. That's just me though. So for the variables that don't involve numbers, such as name for example, I use TRUE and FALSE instead of 1 and 0, even though they're the same thing in that respect. It's just easier for me to figure out what variables do what, just by looking at their values :)