Jump to content

How to fix loop in code.


Miriandandes

Recommended Posts

  On 2/11/2013 at 11:33 AM, Miriandandes said:

Update: I installed Build Your Own House and messed with it a bit, to see if that would change anything. It didn't.

New saves don't have either of these problems.

 

BYOHHouseTrophyBaseScript.getDistance

 

This is not from a mod, it's from Hearthfires.

Link to comment
Share on other sites

  • 1 month later...

The problem with changing its script is that while it's in a loop, the fragment of the loop is saved to the save file so even if the script is changed, the game still uses the old script (the one saved in the save file) and thus nothing is changed when you load the game save. You need to first break the loop. But I have no idea how.

 

EDIT: try adding a quest with the following script attached

 

Scriptname _CHESKO_GeirmundFixQuest extends Quest 
{Fixes bad while loop in event GeirmundsBossBattle.pex goes off the rails.}

import debug
dunGeirmundsBossBattle property myScript auto
Actor property myFixActor auto

Event OnInit()
;Populate the properties

myScript.Duplicate1Actor = myFixActor
myScript.Duplicate2Actor = myFixActor

;Notify the user
if myScript.Duplicate1Actor && myScript.Duplicate2Actor
messagebox("Mythgaard - The problem should be fixed. Save your game, exit, and reload. Then exit and observe your logs. The errors should be gone.")
else
messagebox("Mythgaard - There was a problem. I couldn't repopulate the actors with my dummy for some reason.")
endif
endEvent

 

Then set the propertes myFixActor to an actor that is disabled (I set it to JeremyBig from the test room and made him initially disabled)

and the property of myScript to dunGeirmundsqst

Edited by ragnaroklucifer
Link to comment
Share on other sites

  • 2 years later...
  • Recently Browsing   0 members

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