SandMouseAnarchy Posted March 18, 2019 Share Posted March 18, 2019 Hi guys, i have a small test quest script that looks for when the player enters the power armor workbench and makes a list of all worn items... I thought this would be simple, but im getting a compile error saying that "(4,1): argument aseventname is not specified and has no default value"... this is what i have so far... Scriptname Modular_PA_Re extends Quest Event OnQuestInit() RegisterForTutorialEvent() EndEvent Event OnTutorialEvent(String asEventName, Message aMessage) if asEventName == PowerArmorWorkbenchEntered Actor Player = Game.GetPlayer() int index = 0 int end = 43 const while (index < end) Actor:WornItem wornItem = Player.GetWornItem(index) Debug.Trace("Slot Index: " + index + ", " + wornItem) index += 1 EndWhile EndIf EndEvent As you can see, line 4 says "RegisterForTutorialEvent()" not "aseventname"... "aseventname" is on line 8, and is defined with -> "if asEventName == PowerArmorWorkbenchEntered".if i remove line 4 ("RegisterForTutorialEvent()") then i get the compile error "(8,19): variable PowerArmorWorkbenchEntered is undefined" Its got me wondering if "PowerArmorWorkbenchEntered" is even a valid thing?And im not sure how else to define PowerArmorWorkbenchEntered in my script? - if thats even necisary... Does anyone know how to use OnTutorialEvent(PowerArmorWorkbenchEntered)? - Or know whats going wrong on this one? Link to comment Share on other sites More sharing options...
LoneRaptor Posted March 18, 2019 Share Posted March 18, 2019 (edited) The error is because you have to define the event you want to register for in the RegisterForTutorialEvent()This page has a list of all the valid tutorial events. Also the if statement needs to compare to a string write it like this: if asEventName == "PowerArmorWorkbenchEntered" Edited March 18, 2019 by LoneRaptor Link to comment Share on other sites More sharing options...
SandMouseAnarchy Posted March 18, 2019 Author Share Posted March 18, 2019 AHHHH... Thankyou very much LoneRaptor!! The script compiles fine now :) Link to comment Share on other sites More sharing options...
Recommended Posts