FiftyTifty Posted November 17, 2018 Share Posted November 17, 2018 So I've a fairly big script that runs inside a perk entry, which looks at a dead robot when activated by the player, and gives the player an opportunity to repair it and create a robot follower out of it. But the script won't compile, and the GECK doesn't throw any errors. Here's the script: https://pastebin.com/30rncXED Link to comment Share on other sites More sharing options...
dubiousintent Posted November 17, 2018 Share Posted November 17, 2018 Get the GECK Extender NVSE Plugin (replacement for the venerable GECK 1.4 Powerup NVSE Plugin). Don't use both. It will produce the error messages you need into a log file. I don't see any "Begin <block>" (or it's corresponding "End") in the script. That needs to come after you declare your variables. Perhaps you omitted it when sharing the code with us, but the type of block can be important info. I would also suggest you include a plain "Else" section to give a warning if you fall through all your compound conditional tests. There is a limit to the size a script can be, both in raw form and when compiled. See 'TIP: Script Size limit' in the "Scripting" section of the wiki "Getting started creating mods using GECK" article. -Dubious- Link to comment Share on other sites More sharing options...
FiftyTifty Posted November 17, 2018 Author Share Posted November 17, 2018 (edited) Perk entry point scripts don't use Begin Gamemode, they're already in that state to begin with. I'm also using GECK Extender, and no error is shown in the warning window. Edit: After a bunch of testing, it's a problem with the if code block. For some reason, it doesn't get compiled. I've tried changing the if condition to compare the base record to a form list, but that won't compile either. Edited November 17, 2018 by FiftyTifty Link to comment Share on other sites More sharing options...
FiftyTifty Posted November 17, 2018 Author Share Posted November 17, 2018 As an update, I changed the script to use IsRefInList, and the script compiled. However, none of the if checks returned true, so the code wasn't processed in-game. I then tried IsInList, and it also compiled, but none of the if checks passed either. Here's the script that compiles: https://pastebin.com/2V1sxUxS Link to comment Share on other sites More sharing options...
FiftyTifty Posted November 17, 2018 Author Share Posted November 17, 2018 (edited) Did a bit of poking around, and the reason why it's not working even though it compiles, is that the let refRobotToRepair := GetActionRef command is failing. Why it's failing? No idea.It throws the following error in the console:Error in script 00000000An expression failed to evaluate to a valid resultFile: FalloutNV.esm Offset: 0x0000 Command: Let Edit: Rather than putting the ref in a variable, I instead just removed all mention of it, and just compared it directly. So rather than refRobotToRepair.IsInList, I just used IsInList It works, but now the spawned robot will only change it's package once. Edited November 17, 2018 by FiftyTifty Link to comment Share on other sites More sharing options...
FiftyTifty Posted November 17, 2018 Author Share Posted November 17, 2018 Right, so it turns out that you can't use variables in perk entry scripts. Easy enough to work around, I just keep calling the function that returns what I want. Not great for performance, but this isn't being run on a per-frame basis.The trouble now, is that GetButtonPressed always returns -1 for some reason. Link to comment Share on other sites More sharing options...
Recommended Posts