Jump to content

If, ElseIf, Else conditions not counting correctly


Recommended Posts

Posted

You want to modify your Skyrim.ini file in the documents folder or wherever it might be located for the profile used by your mod manager (if using one). Keep in mind that if the game gets updated or the files verified by Steam, these changes will need to be redone (unless using a mod manager profile instance). Creating a SkyrimCustom.ini file is supposed to be an option but I personally never got that to work with original Skyrim. And opted to use the Mod Organizer profile instances to hold any INI modifications instead.

 

Change these default lines:

[Papyrus]
fPostLoadUpdateTimeMS=500.0
bEnableLogging=0
bEnableTrace=0
bLoadDebugInformation=0

To the following:

[Papyrus]
bEnableLogging=1
bEnableProfiling=0
bEnableTrace=1
bLoadDebugInformation=1
fPostLoadUpdateTimeMS=2000

For information on what these specific setting do, see here: https://www.creationkit.com/index.php?title=INI_Settings_(Papyrus)

You can opt to not change the fPostLoadUpdateTimeMS. That setting was changed by BethINI and brings it in line with game consoles.

 

The log files (no more than 4 total as older ones will be overwritten) will appear in "Documents > My Games > [skyrim or Fallout 4 game in question] > Logs > Script" Some mods will have a troubleshooting option or automatically create a separate trace log that will appear in a "User" folder inside the script folder.

 

To interpret errors, warnings and other information that you see not directly associated with your own trace statements, see here:

https://www.creationkit.com/index.php?title=Papyrus_Runtime_Errors

https://www.afkmods.com/index.php?/topic/4129-skyrim-interpreting-papyrus-log-errors/

Posted
  On 9/14/2021 at 11:21 AM, antstubell said:

So I should add bEnableProfiling=0 because it's not there.

If you won't be changing the value from default (i.e. 0) it does not need to be added. Again that was something put in by BethINI. It adds all the possible settings because they do allow users to make advanced changes if they wish.

Posted (edited)

About your source code, see next code changes maybe its helpful.

 

antShrineObjectScript

  Reveal hidden contents

 

 

edited second version

antShrineObjectScript

  Reveal hidden contents

 

Edited by ReDragon2013
Posted

@ReDragon. I copied and pasted your script 'as is' and compiled. Got these errors.

 

E:\Steam\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\SMTshrineElvenScript2.psc(122,44): variable i is undefined
E:\Steam\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\SMTshrineElvenScript2.psc(122,32): type mismatch on parameter 1 (did you forget a cast?)
E:\Steam\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\SMTshrineElvenScript2.psc(125,44): variable i is undefined
E:\Steam\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\SMTshrineElvenScript2.psc(125,32): type mismatch on parameter 1 (did you forget a cast?)
E:\Steam\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\SMTshrineElvenScript2.psc(128,44): variable i is undefined
E:\Steam\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\SMTshrineElvenScript2.psc(128,32): type mismatch on parameter 1 (did you forget a cast?)
E:\Steam\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\SMTshrineElvenScript2.psc(141,18): variable n is undefined
E:\Steam\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\temp\SMTshrineElvenScript2.psc(141,4): too many arguments passed to function
No output generated for SMTshrineElvenScript2, compilation failed.
Posted

So debugging takes it all the way through the various functions, but the global still does not get updated?

 

Are the properties filled with the correct data?

Are you testing on a new game, a save that has not seen the mod at all, or using COC at the main menu?

  • Recently Browsing   0 members

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