ElfyPers0n Posted February 21, 2016 Share Posted February 21, 2016 (edited) I'm making a mod (Duh) and made the following script a while ago for a custom crafting station: scn Mortarpestlescript ref CrusherActivate ref User Begin OnActivate Set User to GetActionRef If CrusherActivate<1 set CrusherActivate to 1 showMessage aaEldaelMortarpestleMessage ElseIf GetActionRef != Player User.Activate Elseif GetActionRef == Player player.showrecipemenu aaEldaelMortarPestle EndIf END All the REF IDs are valid (I double checked everything), and it let me save it before, but it won't let me save the exact same script anymore, which would suggest that there's an issue with it. Furthermore, it still works in-game in its current state. It wouldn't be an issue, but I want to edit it to allow an external switch (Option menu, etc.) to disable the player's ability to use it, and if I can't save it as is I obviously can't either after some tweaks (I tried). Any ideas? I'm also a terrible scripter, so if anyone has any ideas as to how I could improve it in general, I'm all ears. Edited February 21, 2016 by ElfyPers0n Link to comment Share on other sites More sharing options...
ElfyPers0n Posted February 21, 2016 Author Share Posted February 21, 2016 (edited) The CrusherActivate ref and the first half of the script is so that it shows a message if the player has not used the crafting station before, to explain what the station does, but does not it they have. Edited February 21, 2016 by ElfyPers0n Link to comment Share on other sites More sharing options...
ElfyPers0n Posted February 21, 2016 Author Share Posted February 21, 2016 I just used a collision box for the options menu, which works just as well I suppose, but I'm still really curious as to what is wrong with my script. Link to comment Share on other sites More sharing options...
TommInfinite Posted February 21, 2016 Share Posted February 21, 2016 Try installing GECK PU from here (http://www.nexusmods.com/newvegas/mods/41642/?) - it will tell you why script can't be compiled when you hit "save". Link to comment Share on other sites More sharing options...
ElfyPers0n Posted February 21, 2016 Author Share Posted February 21, 2016 I'm already using PU. Link to comment Share on other sites More sharing options...
TommInfinite Posted February 22, 2016 Share Posted February 22, 2016 (edited) So it should tell why script doesn't compile. Or maybe NVSE does that.You need to create a new shortcut: (change filepath to yours) "C:\Games\Steam\steamapps\common\Fallout New Vegas enplczru\nvse_loader.exe" -editorDon't worry - if you don't use NVSE commands mod will not be NVSE dependent. Edited February 22, 2016 by TommInfinite Link to comment Share on other sites More sharing options...
madmongo Posted February 22, 2016 Share Posted February 22, 2016 Am I misunderstanding something here? It looks to me like you have CrusherActivate defined as a ref but you seem to be using it as if it were an int. Link to comment Share on other sites More sharing options...
TommInfinite Posted February 22, 2016 Share Posted February 22, 2016 Am I misunderstanding something here? It looks to me like you have CrusherActivate defined as a ref but you seem to be using it as if it were an int.Ha-ha indeed. But I think it should not break the script because you can compare reference to a figure. Global variable is a reference and you can: ref MyRef set MyRef to MyGlobalVariable if MyRef >1 ;blablabla endif Link to comment Share on other sites More sharing options...
ElfyPers0n Posted February 22, 2016 Author Share Posted February 22, 2016 I'm using both PU and NVSE, and it isn't telling me anything. It works for other scripts, but it just simply won't save for this one. It doesn't say anything as to why. I tried changing the ref statement for CrusherActivate to an integer one, but it still won't work, and I don't see how it should affect the script since it works fine as is and saved before. Link to comment Share on other sites More sharing options...
dubiousintent Posted February 22, 2016 Share Posted February 22, 2016 Check the properties on the file and folder then. Perhaps it got set to "Read Only". Also make sure that GECK isn't loading/marking the script as "Read Only". -Dubious- Link to comment Share on other sites More sharing options...
Recommended Posts