Page 1 of 1

SkillCheck appears to be returning success all the time.

Posted: Sun Aug 23, 2009 3:51 am
by Yukiko
I am trying to write some skill scripts for the Distro and seem to be having some trouble.

I do a call to SkillCheck and I get success every time even with my character's skill at 0 and the difficulty at 4000. I am using a developer level character to test but I looked at the SkillCheck script and I didn't see any place where that should affect the results. Has anyone else ran across this issue?

Re: SkillCheck appears to be returning success all the time.

Posted: Sun Aug 23, 2009 11:09 am
by Austin
How are you doing the check? It returns how successful / how much you failed.
You need to do

Code: Select all

if ( SkillCheck(...) > 0 )

Re: SkillCheck appears to be returning success all the time.

Posted: Sun Aug 23, 2009 12:56 pm
by Yukiko
Hmmm... now that you mention it I'm using a standard boolean check.
*slaps head*
I keep forgetting that it's not just returning a 0 or a 1.

Thanks Austin, I'll make the change.

Re: SkillCheck appears to be returning success all the time.

Posted: Sun Aug 23, 2009 1:04 pm
by Yukiko
Thanks. That was it.
Just out of curiosity, well more than that because I need to know for this particular script, did the old CheckSkill return only boolean results (a 0 or 1)? It appears from the way many old scripts are written that it did.