Jump to content

[LE] What's wrong with this code? (Skyrim)


Recommended Posts

For some reason, several words (CLUTTER and SOUL GEMS) in the MCM are in all caps and one word is lowercase (gold) even though they aren't that way in the script. Any ideas why this might be?

 

https://imgur.com/a/ZTVmaKv

 

 

 

Scriptname PovertyMCM extends SKI_ConfigBase
{Script created by Evrymetul with help from ReDragon}


; ---------------------------------------------------------------------------------------------


GlobalVariable PROPERTY pIngredient auto
GlobalVariable PROPERTY pHarvestIngredientsFloraNPC auto
GlobalVariable PROPERTY pPotion auto
GlobalVariable PROPERTY pAmmo auto
GlobalVariable PROPERTY pAmmoNPC auto
GlobalVariable PROPERTY pArmor auto
GlobalVariable PROPERTY pWeapon auto
GlobalVariable PROPERTY pBook auto
GlobalVariable PROPERTY pBookSkill auto
GlobalVariable PROPERTY pBookSpell auto
GlobalVariable PROPERTY pClutter auto
GlobalVariable PROPERTY pResource auto
GlobalVariable PROPERTY pHarvestResourceNPC auto
GlobalVariable PROPERTY pSoulGem auto
GlobalVariable PROPERTY pDrink auto
GlobalVariable PROPERTY pFood auto
GlobalVariable PROPERTY pHarvestFoodFlora auto
GlobalVariable PROPERTY pHarvestFoodFloraHanging auto
GlobalVariable PROPERTY pHarvestFoodNPC auto
GlobalVariable PROPERTY pGold auto
GlobalVariable PROPERTY pMerchantGold auto



Int[] a


;--------------------------------------------------
FUNCTION myF_ADD(Int n, String s, GlobalVariable g)
;--------------------------------------------------
AddHeaderOption(s)
a[n] = AddSliderOption("", g.GetValue(), "{0}")
AddEmptyOption()
ENDFUNCTION


;------------------------------------
FUNCTION myF_Dialog(GlobalVariable g)
;------------------------------------

SetSliderDialogStartValue( g.GetValue() )
SetSliderDialogDefaultValue(0)
SetSliderDialogRange(0, 100)
SetSliderDialogInterval(1)
ENDFUNCTION


;-------------------------------------------------
FUNCTION myF_SET(Int n, Float f, GlobalVariable g)
;-------------------------------------------------


SetSliderOptionValue(a[n], f, "{0}%")
g.SetValue(f)
ENDFUNCTION


; -- EVENTs -- 3

;===================
EVENT OnConfigInit()
;===================
a = new Int[21]
Pages = new String[1]
Pages[0] = "Removal Percentages"
ENDEVENT



;=============================
EVENT OnPageReset(String page)
;=============================
SetCursorFillMode(TOP_TO_BOTTOM)
SetCursorPosition(0)

myF_ADD(0, "Alchemy Ingredients", pIngredient)
myF_ADD(1, "Flora/Fauna Ingred/Poison", pHarvestIngredientsFloraNPC)
myF_ADD(2, "Potions", pPotion)
myF_ADD(3, "Arrows", pAmmo)
myF_ADD(4, "NPC Arrows", pAmmoNPC)
myF_ADD(5, "Armor", pArmor)
myF_ADD(6, "Weapons", pWeapon)
myF_ADD(7, "Books", pBook)
myF_ADD(8, "Skillbooks", pBookSkill)
myF_ADD(9, "Spellbooks", pBookSpell)
myF_ADD(10, "Clutter", pClutter)
myF_ADD(11, "Crafting Materials", pResource)
myF_ADD(12, "Animal Crafting Materials", pHarvestResourceNPC)
myF_ADD(13, "Soul Gems", pSoulGem)
myF_ADD(14, "Alcohol", pDrink)
myF_ADD(15, "Food", pFood)
myF_ADD(16, "Crops", pHarvestFoodFlora)
myF_ADD(17, "Hanging Food", pHarvestFoodFloraHanging)
myF_ADD(18, "Animal Meat", pHarvestFoodNPC)
myF_ADD(19, "Gold", pGold)
myF_ADD(20, "Merchant Gold", pMerchantGold)
ENDEVENT


;===================================
EVENT OnOptionSliderOpen(Int option)
;===================================


IF (option == a[0])
myF_Dialog(pIngredient)
RETURN ; - STOP - 1
ENDIF
;---------------------
IF (option == a[1])
myF_Dialog(pHarvestIngredientsFloraNPC)
RETURN ; - STOP - 2
ENDIF
;---------------------
IF (option == a[2])
myF_Dialog(pPotion)
RETURN ; - STOP - 3
ENDIF
;---------------------
IF (option == a[3])
myF_Dialog(pAmmo)
RETURN ; - STOP - 4
ENDIF
;---------------------
IF (option == a[4])
myF_Dialog(pAmmoNPC)
RETURN ; - STOP - 5
ENDIF
;---------------------
IF (option == a[5])
myF_Dialog(pArmor)
RETURN ; - STOP - 6
ENDIF
;---------------------
IF (option == a[6])
myF_Dialog(pWeapon)
RETURN ; - STOP - 7
ENDIF
;---------------------
IF (option == a[7])
myF_Dialog(pBook)
RETURN ; - STOP - 8
ENDIF
;---------------------
IF (option == a[8])
myF_Dialog(pBookSkill)
RETURN ; - STOP - 9
ENDIF
;---------------------
IF (option == a[9])
myF_Dialog(pBookSpell)
RETURN ; - STOP - 10
ENDIF
;---------------------
IF (option == a[10])
myF_Dialog(pClutter)
RETURN ; - STOP - 11
ENDIF
;---------------------
IF (option == a[11])
myF_Dialog(pResource)
RETURN ; - STOP - 12
ENDIF
;---------------------
IF (option == a[12])
myF_Dialog(pHarvestResourceNPC)
RETURN ; - STOP - 13
ENDIF
;---------------------
IF (option == a[13])
myF_Dialog(pSoulGem)
RETURN ; - STOP - 14
ENDIF
;---------------------
IF (option == a[14])
myF_Dialog(pDrink)
RETURN ; - STOP - 15
ENDIF
;---------------------
IF (option == a[15])
myF_Dialog(pFood)
RETURN ; - STOP - 16
ENDIF
;---------------------
IF (option == a[16])
myF_Dialog(pHarvestFoodFlora)
RETURN ; - STOP - 17
ENDIF
;---------------------
IF (option == a[17])
myF_Dialog(pHarvestFoodFloraHanging)
RETURN ; - STOP - 18
ENDIF
;---------------------
IF (option == a[18])
myF_Dialog(pHarvestFoodNPC)
RETURN ; - STOP - 19
ENDIF
;---------------------
IF (option == a[19])
myF_Dialog(pGold)
RETURN ; - STOP - 20
ENDIF
;---------------------
IF (option == a[20])
myF_Dialog(pMerchantGold)
;;; RETURN ; - STOP - 21
ENDIF
;---------------------
ENDEVENT

;==================================================
EVENT OnOptionSliderAccept(Int option, Float value)
;==================================================


IF (option == a[0])
myF_SET(0, value, pIngredient)
RETURN ; - STOP - 1
ENDIF
;---------------------
IF (option == a[1])
myF_SET(1, value, pHarvestIngredientsFloraNPC)
RETURN ; - STOP - 2
ENDIF
;---------------------
IF (option == a[2])
myF_SET(2, value, pPotion)
RETURN ; - STOP - 3
ENDIF
;---------------------
IF (option == a[3])
myF_SET(3, value, pAmmo)
RETURN ; - STOP - 4
ENDIF
;---------------------
IF (option == a[4])
myF_SET(4, value, pAmmoNPC)
RETURN ; - STOP - 5
ENDIF
;---------------------
IF (option == a[5])
myF_SET(5, value, pArmor)
RETURN ; - STOP - 6
ENDIF
;---------------------
IF (option == a[6])
myF_SET(6, value, pWeapon)
RETURN ; - STOP - 7
ENDIF
;---------------------
IF (option == a[7])
myF_SET(7, value, pBook)
RETURN ; - STOP - 8
ENDIF
;---------------------
IF (option == a[8])
myF_SET(8, value, pBookSkill)
RETURN ; - STOP - 9
ENDIF
;---------------------
IF (option == a[9])
myF_SET(9, value, pBookSpell)
RETURN ; - STOP - 10
ENDIF
;---------------------
IF (option == a[10])
myF_SET(10, value, pClutter)
RETURN ; - STOP - 11
ENDIF
;---------------------
IF (option == a[11])
myF_SET(11, value, pResource)
RETURN ; - STOP - 12
ENDIF
;---------------------
IF (option == a[12])
myF_SET(12, value, pHarvestResourceNPC)
RETURN ; - STOP - 13
ENDIF
;---------------------
IF (option == a[13])
myF_SET(13, value, pSoulGem)
RETURN ; - STOP - 14
ENDIF
;---------------------
IF (option == a[14])
myF_SET(14, value, pDrink)
RETURN ; - STOP - 15
ENDIF
;---------------------
IF (option == a[15])
myF_SET(15, value, pFood)
RETURN ; - STOP - 16
ENDIF
;---------------------
IF (option == a[16])
myF_SET(16, value, pHarvestFoodFlora)
RETURN ; - STOP - 17
ENDIF
;---------------------
IF (option == a[17])
myF_SET(17, value, pHarvestFoodFloraHanging)
RETURN ; - STOP - 18
ENDIF
;---------------------
IF (option == a[18])
myF_SET(18, value, pHarvestFoodNPC)
RETURN ; - STOP - 19
ENDIF
;---------------------
IF (option == a[19])
myF_SET(19, value, pGold)
RETURN ; - STOP - 20
ENDIF
;---------------------
IF (option == a[20])
myF_SET(20, value, pMerchantGold)
;;; RETURN ; - STOP - 21
ENDIF
;---------------------
ENDEVENT

 

Edited by evrymetul
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...