lgpmichael Posted July 20, 2011 Share Posted July 20, 2011 I'm an old-fashioned programmer, so one suggestion I'd make purely for readability is - use brackets! I'm assuming that "if BanditLeaderRef.GetDead && getstage RaivenDungeonQuest == 10" is supposed to mean "if BanditLeaderRef.GetDead && (getstage RaivenDungeonQuest == 10)" rather than "if (BanditLeaderRef.GetDead && getstage RaivenDungeonQuest) == 10", but if you use brackets to be certain what is being tested you guarantee the expected result - I've seen occasions where a compiler picks the wrong priority for functions. He's safe with the order of events in that line, it evaluates left to right. (I know what you mean though, Im a C coder and the lack of syntax enforcement in the CS makes me a sad coder) Your quickest way to check is simply add a messagebox with a value in it, so for example: scn RaivenCryptQuest short debug short debug2 Begin GameMode if player.getincell aaaundeaddungeon1 && getstage RaivenDungeonQuest == 0 setstage RaivenDungeonQuest 5 addtopic undeadhelp endif if getstage RaivenDungeonQuest == 10 player.addspell SummonZombieHelpers endif set debug to BanditLeaderRef.GetDead set debug2 to GetStage RaivenDungeonQuest MessageBox " Test conditions are %.0d %.0d",debug,debug2 if BanditLeaderRef.GetDead && getstage RaivenDungeonQuest == 10 MessageBox "Test passed, setting values" setstage RaivenDungeonQuest 15 addtopic UndeadEnd player.additem MagicalGem 1 endif End You will only get one messagebox, so you will either get one saying you got the right execution path, or one telling you why, and from there, you can know what is wrong. Link to comment Share on other sites More sharing options...
Recommended Posts