ID:1535582
 
(See the best response by LordAndrew.)
what am i doing wrong?:
mob
Login()
loc = location (/turf/start)

It says undefined proc.
I have all the indenting right
Best response
Hey there Flying1ace. In the future, please make sure to wrap your code in <dm> tags, so that it will format properly.

The issue is that there is no procedure by the name of location(). I believe you're wanting locate() instead.
Flying1ace wrote:
what am i doing wrong?:
> mob
> Login()
> loc = location (/turf/start)
>

It says undefined proc.
I have all the indenting right


Here is a simple fix for you, if you prefer location() over locate() I guess.

proc
location(arg1,arg2,arg3)
if(arg1&&arg2&&arg3)return locate(arg1,arg2,arg3)
else return locate(arg1)

mob
Login()
loc = location (/turf/start)

turf
start
Note: I know it's redundant but eh.
Flying1ace is easier to use locate() proc:

mob
Login()
loc = locate(/turf/start)

In response to Ssj4justdale
I wouldn't even count that as a convenience function; that's just awful.
In response to KingDeity
KingDeity wrote:
I wouldn't even count that as a convenience function; that's just awful.

Noted.
Damn trolls, instead of removing a few letters, they go and write new code to fix the old code.

Well done, 5 points!
In response to Taitz
Taitz wrote:
Damn trolls, instead of removing a few letters, they go and write new code to fix the old code.

Well done, 5 points!

Haha funny. I'm just assuming that this guy will be using location() persistently and will be wondering why he keeps getting these errors. By the off chance that he makes this mistake, he has no worries at all.



I do similar stuff with #define because at times I want my code to say mob/function/this() rather than mob/proc/this()


just by using #define function proc
Heh heh, yep I realised almost as soon as I made the post, oops!