SkillCheck appears to be returning success all the time.

Get Help on scripting in POL with configurations, config setups, script trouble shooting, etc.
Post Reply
Yukiko
Distro Developer
Posts: 2826
Joined: Thu Feb 02, 2006 1:41 pm

SkillCheck appears to be returning success all the time.

Post 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?
User avatar
Austin
Former Developer
Posts: 621
Joined: Wed Jan 25, 2006 2:30 am

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

Post 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 )
Yukiko
Distro Developer
Posts: 2826
Joined: Thu Feb 02, 2006 1:41 pm

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

Post 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.
Yukiko
Distro Developer
Posts: 2826
Joined: Thu Feb 02, 2006 1:41 pm

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

Post 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.
Post Reply