ID:140578
 
Code:
client
North()
var/X = -1
var/Y = 1
src.mob.Move("[src.mob.x+X],[src.mob.y+Y],[src.mob.z]",1)


Problem description:

Overwriting client.mob.Move is displaying a runtime cannot execute null.Enter, and I am stumped at what the error is caused by.

runtime error: Cannot execute null.Enter().
proc name: North (/client/North)
source file: Destiny.dm,181
usr: TheMob (/mob/player/warrior)
src: Pirion (/client)
call stack:
Pirion (/client): North()
instead of setting it to -1 why dont u just set it to 1 and just minus it instead of adding it to x??
First: You aren't overwriting client.mob.Move(). The statement does not even particularly make any sense.

Second: You are not passing the correct arguments to Move(). Look it up in the Reference.

Third: Why are you even circumventing client/Move() like this? There's zero benefit that I can see.
In response to Garthor
Garthor wrote:
First: You aren't overwriting client.mob.Move(). The statement does not even particularly make any sense.
I ment im overwriting the client.North...ect sorry.

Second: You are not passing the correct arguments to Move(). Look it up in the Reference.

Move(loc,dir)
location is mob.x+1, mob.y-1, mob.z?
direction i just wanted to leave for now...

Third: Why are you even circumventing client/Move() like this? There's zero benefit that I can see.
I want the screwed up isometric to move to the top of the screen when i press up, not the top left.
In response to Agrey123
It was so I can be lazy...I didn't want to have to change the src.mob.move each time, just change the X, Y.
In response to Pirion
Pirion wrote:
I want the screwed up isometric to move to the top of the screen when i press up, not the top left.

That's understandable.

Two decent ways to do this. 1) change the macros so that the up button actually calls the .northeast, etc. 2) Change North()/South()/etc. like following:
client
North(redirected = 0)
if(!redirected)
return Northeast(1)
return ..()
Northeast(redirected = 0)
if(!redirected)
return East(1)
return ..()
East(redirected = 0)
etc.
In response to Loduwijk
That is ingenious!

thanks.