dizietemblesssma Posted January 17, 2022 Posted January 17, 2022 I'm starting on my first script for F4 coming from Skyrim.here it is: Scriptname dz_no_attacks_quest_script Extends Quest Form FormFromOtherMod = Game.GetFormFromFile(0x0006F5C5, "Fallout4.esm") As Form and it fails to compile with error:Compiling "C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\Data\Scripts\Source\dz_no_attacks_quest_script.psc"...C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\Data\Scripts\Source\dz_no_attacks_quest_script.psc(8,24): no viable alternative at input 'Game'C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\Data\Scripts\Source\dz_no_attacks_quest_script.psc(8,28): required (...)+ loop did not match anything at input '.'C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\Data\Scripts\Source\dz_no_attacks_quest_script.psc(8,5): Unknown user flag game and I'm already defeated:)Can anyone help? Am I making some sort of Skyrim learnt mistake? diziet
DieFeM Posted January 17, 2022 Posted January 17, 2022 (edited) You can declare an object globally, but you can't call a function in the global scope of the script, you need to declare a function or event, and call the function there, for example, if you want to use it globally, for many functions/events of the script, you can declare it globally and fill it in the init event, like this: Scriptname dz_no_attacks_quest_script Extends Quest Form FormFromOtherMod Event OnQuestInit() FormFromOtherMod = Game.GetFormFromFile(0x0006F5C5, "Fallout4.esm") EndEventOr you can declare and fill it only for the scope of a given function/event: Scriptname dz_no_attacks_quest_script Extends Quest Event OnQuestInit() Form FormFromOtherMod = Game.GetFormFromFile(0x0006F5C5, "Fallout4.esm") EndEvent Edited January 17, 2022 by DieFeM
dizietemblesssma Posted January 17, 2022 Author Posted January 17, 2022 Well that's a big fat DOH! from me:)Thankyou very much! diziet
Recommended Posts