ID:272720
Dec 26 2008, 11:35 am
|
|
I want to use a proc as a "check", if you will, so that if it returns false, a verb will discontinue with the rest of its coding, much like a return.
|
In response to Andre-g1
|
|
I figured as much. Now for the other issue that made me unsure...
world General Procs.dm:29:error:src.isAway:undefined var I know it has to do with the fact that I made the players' typepath to /mob/Player, but I don't know how to make it so the procs and verbs read it like that too. |
In response to Mizukouken Ketsu
|
|
-First change your failCheck() proc, so it's under mob/Player.
--Secondly, reading my post would be nice. A proc returns false by default, so why'd you make it return 0 ? 0 is considered a FALSE value. Also, if you're returning FALSE values, why are you checking if the return value of the proc is true ? Makes no sense at all. Afterwards, since you're checking the src in the failCheck() you need to pass the mob onto the proc. So, if(failCheck()) should actually be if(!usr.failCheck()). |
In response to Andre-g1
|
|
mob/Stuff/verb Stuff.dm:20:error:failCheck:undefined proc |
In response to Mizukouken Ketsu
|
|
Read the bottom part of my post...
|
In response to Andre-g1
|
|
Why do people like to assume I "didn't read all of my post". I did. Still didn't work. Said same exact thing. Help now, please?
EDIT Nevermind, I figured it out. |
In response to Mizukouken Ketsu
|
|
Mizukouken Ketsu wrote:
Why do people like to assume I "didn't read all of my post". Because you didn't use the way I told you to. I just tested with your snippet and it worked fine the way I told you. |
In response to Andre-g1
|
|
Well it didn't work for me, sorry. However, I did find a way for it to work. Thanks anyways.
|
In response to Andre-g1
|
|
Andre-g1 wrote:
--Secondly, reading my post would be nice. A proc returns false by default, so why'd you make it return 0 ? 0 is considered a FALSE value. Also, if you're returning FALSE values, why are you checking if the return value of the proc is true ? Makes no sense at all. It's done often to indicate, explicitly, that the proc needs to return false. This is contrasting using return simply to indicate the proc is halting. |
You just need to check if the value the proc returns is true or false.