proc/Check() if(prob(60)) return TRUE // procs return false by default
mob/verb/Doodly_doodly_doo() // <_< world << "Will it be possible ? Will the world be saved from total domination ?!" if(!Check()) return world << "Success!"
You just need to check if the value the proc returns is true or false.
I figured as much. Now for the other issue that made me unsure...
world mob = /mob/Player
mob/Player/var tmp/isAway = FALSE
mob/proc/failCheck() if(src.isAway) return 0
mob/verb Test() if(failCheck()) return usr<<"This is not supposed to be displayed"
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.
-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()).
--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.