I've got a weird (and mostly consistent) problem with the Madd Leveler program. For a reason I haven't quite figured out yet, this script doesn't work correctly.
Begin Madd_Leveler_StatReport Short State if ( menumode == 1 ) return endif If ( State == 0 ) MessageBox "Base Stats(test): Strength %.0f, Agility %.0f, Endurance %.0f, Intelligence %.0f, Willpower %.0f, Personality %.0f, Speed %.0f, Luck %.0f.", Base_Strength, Base_Agility, Base_Endurance, Base_Intelligence, Base_Willpower, Base_Personality, Base_Speed, Base_Luck, "Ok" Set State To 1 Return ElseIf ( State == 1 ) MessageBox "Base Combat Skills: Armorer %.0f, Athletics %.0f, Axe %.0f, Block %.0f, Blunt Weapon %.0f, Heavy Armor %.0f, Long Blade %.0f, Medium Armor %.0f, Spear %.0f.", Base_Armorer, Base_Athletics, Base_Axe, Base_Block, Base_BluntWeapon, Base_HeavyArmor, Base_LongBlade, Base_MediumArmor, Base_Spear, "Ok" Set State To 2 Return ElseIf ( State == 2 ) MessageBox "Base Combat Skills: Armorer %.0f, Athletics %.0f, Axe %.0f, Block %.0f, Blunt Weapon %.0f, Heavy Armor %.0f, Long Blade %.0f, Medium Armor %.0f, Spear %.0f.", Base_Armorer, Base_Athletics, Base_Axe, Base_Block, Base_BluntWeapon, Base_HeavyArmor, Base_LongBlade, Base_MediumArmor, Base_Spear, "Ok" Set State To 3 Return ElseIf ( State == 3 ) MessageBox "Base Stealth Skills: Acrobatics %.0f, Hand-To-Hand %.0f, Light Armor %.0f, Marksman %.0f, Mercantile %.0f, Security %.0f, Short Blade %.0f, Sneak %.0f, Speechcraft %.0f.", Base_Acrobatics, Base_HandToHand, Base_LightArmor, Base_Marksman, Base_Mercantile, Base_Security, Base_ShortBlade, Base_Sneak, Base_Speechcraft, "Ok" Set State To 0 Else Set State To 0 Return EndIf StopScript Madd_Leveler_StatReportEnd
What happens is the first (Stats) box pops, then it SKIPS the Combat Skills box, and SOMETIMES skips the Stealth Skills box. Looking at the code makes me think it's because the State variable isn't getting set/updated properly, but if that's the case:
- What could be causing that?
- Is there anything I can do about that, or, alternatively, is there a way to re-write this script to make it perform more reliably?
I'm going to take a look at MWSFD and see if I can figure anything out myself, but I am NOT an expert coder/programmer by any stretch, and may easily be missing something simple and obvious. Any suggestions are appreciated.
Rochndil, who is tech writer, not a programmer...