How to cleanly update script properties...

Post » Wed Jul 17, 2013 12:29 pm

I can't believe this is the normal behavior, but I have heard horror stories of "papyrus wizardry" and so I suppose it could well be a known problem...

Recently I made a VERY simple alteration to a script. I had an array property with a total of four indexed values. I didn't change any of the assigned variables at all. I merely added an additional index at the END of the array, and defined it. Now suddenly papyrus is full of errors:

Error: Array index 5 is out of range (0-4)

I have tried various posted methods of updating the mod but so far it seems that there is no way to work around this. Even creating a clean save without the mod loaded and loading the new version fails to clear these baked in values.

It seems very difficult for me to accept that simply adding another value at the end of an array without changing any of the previously defined values or positions would require starting a completely new save to continue using the mod.

I mean sure, MAYBE if I had added the new value at the BEGINNING of the array, thus changing the index position value of the previously defined variables, but this... It just seems inconceivable!

If anyone knows a simple way around this problem I would be in your debt.

User avatar
Andrew Lang
 
Posts: 3489
Joined: Thu Oct 11, 2007 8:50 pm

Post » Wed Jul 17, 2013 10:18 am

Well, the workaround is pretty simple at least... Just create a new separate single property for the added value, and leave existing arrays the heck alone!

Live and learn I s'pose. :P

User avatar
mishionary
 
Posts: 3414
Joined: Tue Feb 20, 2007 6:19 am


Return to V - Skyrim