Sorry, and again don't take this personally, but if local variables aren't going to work, the compiler should flag them as errors. Having to look in the documentation is not the right answer.
short iset i to player.getlevelif i > 6 ... do something...
short ishort nref questsetStage CRAFTHelper 0setStage CRAFTHelperRefChecker 1if CHMenuStyle == 1 set CRAFTHelper.showCategories to 0 set CRAFTHelper.showAmmo to 1 set CRAFTHelper.showArmors to 1 set CRAFTHelper.showMisc to 1 set CRAFTHelper.showWeapons to 1else set CRAFTHelper.showCategories to 1 set CRAFTHelper.showAmmo to 0 set CRAFTHelper.showArmors to 0 set CRAFTHelper.showMisc to 0 set CRAFTHelper.showWeapons to 0endifset i to 0set n to listGetCount CHInitListLabel 99if i < n set quest to listGetNthForm CHInitList i if quest != 0 setStage quest 1 endif set i to i + 1 goto 99endif
scn mightworkint debtint countref NPCbegin OnAdd set NPC to GetContainer set debt to quest.PlayerOwes set count to debt/100 if count <= getitemcount NCRMoney100 player.removeitem NCRMoney100 count NPC.additem NCRMoney100 count set debt to debt-count*100 endif set count to debt/20 if count <= getitemcount NCRMoney20 player.removeitem NCRMoney20 count NPC.additem NCRMoney20 count set debt to debt-count*20 endif set count to debt/5 if count <= getitemcount NCRMoney5 player.removeitem NCRMoney5 count NPC.additem NCRMoney5 count set debt to debt-count*5 endif set quest.PlayerOwes to debtend
scn mightwork
scn CEOpaymenttokenint Debtint Changeint Hundredsint Twentiesint Fivesint Denariiint Aureiint Billsbegin OnAdd if CEOvrscript.NCRpayment > 0 set Debt to CEOvrscript.NCRpayment set Change to 0 set Hundreds to player.GetItemCount MoneyNCR100 set Twenties to player.GetItemCount MoneyNCR20 set Fives to player.GetItemCount MoneyNCR5 if Hundreds > 0 && Debt >= 100 ;// Pay as much as possible in hundreds set Bills to Debt/100 if Bills <= Hundreds player.RemoveItem MoneyNCR100 Bills set Hundreds to (Hundreds - Bills) set Debt to (Debt - (Bills * 100)) elseif Bills > Hundreds player.RemoveItem MoneyNCR100 Hundreds set Hundreds to 0 set Debt to (Debt - (Hundreds * 100)) endif endif if Twenties > 0 && Debt >= 20 ;// Pay as much as possible in twenties set Bills to Debt/20 if Bills <= Twenties player.RemoveItem MoneyNCR20 Bills set Twenties to (Twenties - Bills) set Debt to (Debt - (Bills * 20)) elseif Bills > Twenties player.RemoveItem MoneyNCR20 Twenties set Twenties to 0 set Debt to (Debt - (Twenties * 20)) endif endif if Fives > 0 && Debt >= 5 ;// Pay as much as possible in fives set Bills to Debt/5 if Bills <= Fives player.RemoveItem MoneyNCR5 Bills set Fives to (Fives - Bills) set Debt to (Debt - (Bills * 5)) elseif Bills > Fives player.RemoveItem MoneyNCR5 Fives set Fives to 0 set Debt to (Debt - (Fives * 5)) endif endif if Debt >= 20 && Hundreds > 0 ;// Change in a hundred if needed player.RemoveItem MoneyNCR100 1 set Change to (100 - Debt) set Debt to 0 elseif Debt > 0 if Twenties > 0 ;// Change in a twenty if needed player.RemoveItem MoneyNCR20 1 set Change to (20 - Debt) set Debt to 0 elseif Twenties <= 0 ;// Change in a hundred if out of twenties player.RemoveItem MoneyNCR100 1 set Change to (100 - Debt) set Debt to 0 endif endif if Change > 0 if Change > 20 ;// Make change in twenties set Bills to Change/20 player.AddItem MoneyNCR20 Bills set Change to (Change - (Bills * 20)) endif if Change > 5 ;// Make change in fives set Bills to Change/5 player.AddItem MoneyNCR5 Bills set Change to (Change - (Bills * 5)) endif endif endif if CEOvrscript.LEGIONpayment > 0 endifend