Jump to content

Compiling script with OBSE functions


Yumago

Recommended Posts

Hey there,

 

Yesterday I installed both the CS and OBSE. I have no idea how to compile scripts using OBSE functions without having the CS compiler complain. An abbreviated example would be switching enchantments on an item:

 

ScriptName AAAWidowBoundScript

ref UserRef

Begin OnUnequip
MessageBox "The amulet loses its beautiful luster and your body goes limb for a split second as you feel its presence fade away. Whatever was inside the adornment has left your body now. You feel powerless and weak in comparison"
this.SetEnchantment AAAWidowTiaraNormalENCH
End


Begin OnAdd
set UserRef to GetContainer
End


Begin OnEquip
MessageBox "The amulet is a silvery-brass color. It looks old and worn and is cold to the touch. As you tighten it around your scalp a blinding flash of light almost knocks you off your feet. Suddenly, a thin mist envelops you as the amulet opens its magicks to you."
this.SetEnchantment AAAWidowTiaraENCH
End

 

When I try to compile, it tells me:

-'SetEnchantment' is an unknown variable/function

-it could not parse "this.SetEnchantment AAAWidowTiaraNormalENCH" (syntax error)

-mismatched begin/end block starting at 'Begin OnUnequip'

 

So my question is if this is all syntactically correct (which I hope ^^"), what's going on and how can I get this script to compile after all?

 

Thanks in advance :3

Link to comment
Share on other sites

  • 9 years later...
  • Recently Browsing   0 members

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