Jump to content

Script keep getting errors


smjn

Recommended Posts

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.

Link to comment
Share on other sites

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

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.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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