smjn Posted December 2, 2012 Posted December 2, 2012 Don't know why, but I keep getting errors. Here's my script. scn 000PipLightSpellScript Begin ScriptEffectStart if ((player.getequipped DLC02ArmorPowerT51bHelmetWasteland) || (player.getequipped DLC02ArmorPowerT51bHelmet) || (player.getequipped DLC02ArmorStealthWasteland) || (player.getequipped DLC03ArmorEnclaveHelmet) || (player.getequipped ArmorTeslaHelmet) || (player.getequipped ArmorPowerT51bHelmet) || (player.getequipped ArmorPowerHelmetOutcast)) == 0 if ((player.getequipped ArmorPowerHelmetBrotherhoodOfSteel) || (player.getequipped ArmorPowerHelmet) || (player.getequipped ArmorEnclaveHelmet) || (player.getequipped ArmorReconHelmet) || (player.getequipped ArmorReconHelmetOutcast) || (player.getequipped ArmorTribalPowerHelmet) || (player.getequipped ArmorAshurPowerHelmet)) == 0 player.AddSpellNS 000PipboyLightAbility else endif endif End Begin ScriptEffectFinish if player.isspelltarget 000PipboyLightAbility player.removespell 000PipboyLightAbility endif End When I try to save, it keeps on giving me these error codes: SCRIPTS: Script '000PipLightSpellScript', line 7: Unknown variable or function 'AddSpellNS'. Context: DEFAULT --- SCRIPTS: Script '000PipLightSpellScript', line 7: Syntax Error player.AddSpellNS 000PipboyLight Ability Could not parse this line. Context: DEFAULT --- SCRIPTS: Script '000PipLightSpellScript', line 4: Mismatched begin/end block starting on line 4. Context: DEFAULT --- SCRIPTS: Script '000PipLightSpellScript', line 4: Mismatched begin/end block. Context: DEFAULT A little off topic-- what is a good GECKCustom settings?--I think these errors are caused by it. Again, thanks for the help.
rickerhk Posted December 3, 2012 Posted December 3, 2012 As a general rule, don't prefix anything with a number if you intend to use it in a script. That includes script names.
smjn Posted December 4, 2012 Author Posted December 4, 2012 (edited) On 12/3/2012 at 11:59 PM, rickerhk said: As a general rule, don't prefix anything with a number if you intend to use it in a script. That includes script names. Eh. Forgot to mention, this is a script revision of a pre existing mod Power Helmet Night Vision. I don't know what you mean by prefixing, care to explain--I am a total beginner when it comes to scripting. Edited December 4, 2012 by smjn
rickerhk Posted December 4, 2012 Posted December 4, 2012 Oh - there is no 'AddSpellNS'. Just AddSpell. Probably why it wont save.By prefix I mean the 000 in front of your EditorID's. Or any other numbers. During compilation the script parser can sometimes mistake an EditorD for a FormID if it's prefixed with a number, so it's just not a good idea. Doesn't mean it will always fail - I think if it's a REFid name it will most always fail.
prensa Posted December 4, 2012 Posted December 4, 2012 smjn - Hello! AddSpellNS is an FOSE function: http://geck.bethsoft.com/index.php/AddSpellNS So you need to run to use it you need FOSE & must run GECK via FOSE. The vanilla GECK can't deal with FOSE functions & just thinks they are errors. I've given a more detailed reply to your other post. Hope this helps! Prensa
Recommended Posts