Jump to content

Recommended Posts

Posted

I am using the state options in MCM. Seems, however, there is a limit to the number of states that can be used.

 

I got this in the papyrus log when wanting to test only the appearance of the MCM menu:

[10/12/2016 - 09:35:24AM] error: Class abim_IMS_MCMQuestScript overflowed the named state count field(s) while linking. The class is marked as invalid. A programmer must adjust the bit field sizes
[10/12/2016 - 09:35:24AM] Error: Unable to bind script abim_IMS_MCMQuestScript to abim_IMS_MCMQuest (08001D90) because their base types do not match

I got similar in my Creation Kit editor log when attempting to access the script to assign added properties:

See Warnings file for more information.
SCRIPTS: error: Class abim_IMS_MCMQuestScript overflowed the named state count field(s) while linking. The class is marked as invalid. A programmer must adjust the bit field sizes

I loaded my script in Notepad++ and had it do a count of the number of EndState instances. 129 total.

 

128 seems like the logical limit as that is the limit for arrays. I'd hate to have to re-write the script (again) to use the non-state method.

 

Here is an example of one state that is currently repeated 16 times:

 

State   Weightless0
    Event OnSelectST()
        Int index = 0
        WeightlesActive[index] = !WeightlesActive[index]
        SetToggleOptionValueST(WeightlesActive[index])
    EndEvent
    Event OnDefaultST()
        Int index = 0
        WeightlesActive[index] = false
        SetToggleOptionValueST(WeightlesActive[index])
    EndEvent
    Event OnHighlightST()
        Int index = 0
        If ComponentChoice[index] != 0
            SetInfoText("$WeightlessInfo")
        EndIf
    EndEvent
EndState

 

If I could pass the index value into the state, I could use just one state instead of several different ones. As far as I know, one cannot do:

State SomeStateName(Int index)

If I declare index in the 'empty state' and define it just before each group of options in the OnPageReset event, would the state use the correct index value?

Posted

I resolved it by converting a specific portion of my options into the non-state method. It frees up enough states that I can continue with the rest that will need to use the state options.

  • Recently Browsing   0 members

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