Code:
Problem description:
ive got some problem with this:
Bump(mob/M)
if(M.player == 1)
Fight(M)
and i got this error
runtime error: undefined variable /turf/icewall5/var/player
proc name: Bump (/mob/Hobgoblin/Bump)
source file: TheDemo.dm,233
usr: Hobgoblin (/mob/Hobgoblin)
src: Hobgoblin (/mob/Hobgoblin)
call stack:
Hobgoblin (/mob/Hobgoblin): Bump(the icewall (11,62,1) (/turf/icewall5))
Hobgoblin (/mob/Hobgoblin): Wander(the gonzalo (/mob/You/Warrior))
how can i fix it?
ID:146224
![]() Aug 7 2005, 8:40 am
|
|
Code:
mob ------------------------------------------------------------ 1. To Robert, no put usr <font color=blue>in</font> <font color=blue>proc</font>. 2. <font color=blue>If</font> indeed there <font color=blue>is</font> a mob type called mob/M, then by all means keep that <font color=blue>in</font> the <font color=blue>proc</font> parenthesis, otherwise just make it mob or replace usr with M. I have now fixed said problem above. ------------------------------------------------------------ 1. To the owner of the post. For the Gods' sakes, it doesn't take a fool to figure out that the code goes <font color=blue>in</font> the tags under: "Code:" 2. It would be nice to see the code relevant to the runtime error. <font size=4>Thirdly and most importantly</font>: From what I see of the runtime error, it seems you need to make 2 different bumpfight <font color=blue>proc</font>s(one <font color=blue>for</font> enemy and one for player), and make the enemy type mob/enemies/enemyname or something to that manner. <font color=blue>If</font> you took my advice, it should look like this or something relevant. mob/You ------------------------------------------------------------ Also, <font color=red face=system>runtime error: undefined variable /turf/icewall5/var/player</font> It should be <font color=blue>var</font>/turf/icewall5/player |
Code:
hope it helps!