Jump to content

Valid Script Won't Save in GECK


ElfyPers0n

Recommended Posts

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 by ElfyPers0n
Link to comment
Share on other sites

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" -editor

Don't worry - if you don't use NVSE commands mod will not be NVSE dependent.

Edited by TommInfinite
Link to comment
Share on other sites

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

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

  • Recently Browsing   0 members

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