OnEnter script not seeming to work
#1
Posté 26 mars 2012 - 01:04
http://pastebin.myrror.net/3121
The issue here is that the GetIsRemovedSkill() is always returning FALSE, even when it should be returning true. I've tried replacing the if statement for one that just manually checks the numbers but it does not work either. I think the issue may be somewhere with the nSkillConstant in the for loop, but am unsure. Any help is appriciated.
#2
Posté 26 mars 2012 - 04:28
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 .
#3
Posté 26 mars 2012 - 05:05
#4
Posté 26 mars 2012 - 05:17
Granted, that foesn't help you with your current script dilemna, but it does provide an option for you if you were to decide to go about it a different way.
#5
Posté 26 mars 2012 - 07:44
Peepsy wrote...
I do not understand what you mean, Funky. I'm sorry, I'm a bit dense.
Add the default line I posted to that switch, at the bottom. It will send the playtester pc a message telling them what number is being passed into that function. This is how you do basic debug code - isolate the symptom (you have), and track it backwards until you find the problem causing it.
Once you've done that, we can take it from there. LMK if that's still not clear enough - I'm happy to elaborate further.
Funky
#6
Posté 27 mars 2012 - 03:40
A little more information about how you have your 2da's set up is needed.
#7
Posté 27 mars 2012 - 06:38
Lightfoot8 wrote...
I do not understand why you are doing some of the things you are doing in the posted script. They only make since if you have changed the "SkillsTable" entry in classes.2da. Is this the case? If it is not the case it looks like you are overworking the problem. The entire 'for loop' is unneeded. 'i' will end up being equal to nSkillCount every time, nSkillConstant will also end up being equal to nSkillcount. The 2da line for the skill in skills.2da by default have to be the same as the line in cls_skill_*.2da.
A little more information about how you have your 2da's set up is needed.
Not quite; there are three skills that are ineligible for certain classes (animal empathy, perform, and UMD). Animal empathy takes the top (zeroeth) line, which means all classes besides druid, ranger, or shifter will automatically have all their lines off by at least one.
But Lightfoot is right that the loop is unnecessary. All you need to do is use the "SkillIndex" column to get your row number for skills.2da
Modifié par WhiZard, 27 mars 2012 - 06:54 .
#8
Posté 27 mars 2012 - 07:15
#9
Posté 06 avril 2012 - 10:26





Retour en haut






