You're passing a number other than those in this switch into it, then.
27 switch (nSkillToCheck) {
28 case 6: return TRUE;
29 case 8: return TRUE;
30 case 9: return TRUE;
31 case 12: return TRUE;
32 case 14: return TRUE;
33 case 15: return TRUE;
34 case 22: return TRUE;
35 case 26: return TRUE;
36 }
Add debug to find out what number you're passing it - for example, a default case with something like:
default: SendMessageToPC(GetFirstPC(), "nSkillToCheck:" + IntToString(nSkillToCheck)); return FALSE;
I suspect there's a problem with one of your 2da reads that leads a 0 to be passed, but I didn't bother looking too carefully, because setting up debug properly will solve this one easily.
Funky
Modifié par FunkySwerve, 26 mars 2012 - 04:30 .