Videniofthesith Posted February 12, 2011 Share Posted February 12, 2011 I have this script on a sword, the effect is an ability and it works just fine or so I thought scriptname aaaFearSong ref Wearer Begin OnEquip set Wearer to GetContainer Wearer.AddSpell aaaSwordeffect3 End Begin OnUnequip set Wearer to Getcontainer Wearer.Removespell aaaswordeffect3 End As you can tell when you equip the sword, the sword effect is added as an ability. That works fine, but when the sword is removed, the effect doesn't go away like it should. Can someone please help? I honestly don't know why it doesn't work, I can't understand it. Link to comment Share on other sites More sharing options...
Hickory Posted February 12, 2011 Share Posted February 12, 2011 You're missing an End declaration. Link to comment Share on other sites More sharing options...
Videniofthesith Posted February 12, 2011 Author Share Posted February 12, 2011 You're missing an End declaration. Um, I will see if I can't find where then. Link to comment Share on other sites More sharing options...
Videniofthesith Posted February 12, 2011 Author Share Posted February 12, 2011 Well, that worked. Thanks. I added a Endif before the End on each one, and it is better. Thanks a ton. Link to comment Share on other sites More sharing options...
Hickory Posted February 13, 2011 Share Posted February 13, 2011 Well, that worked. Thanks. I added a Endif before the End on each one, and it is better. Thanks a ton. What? You weren't even using any If statements! You simply had missed the End statement for the ScriptName. Look: scriptname aaaFearSong ref Wearer Begin OnEquip set Wearer to GetContainer Wearer.AddSpell aaaSwordeffect3 End Begin OnUnequip set Wearer to Getcontainer Wearer.Removespell aaaswordeffect3 End .... <------- Missing End Link to comment Share on other sites More sharing options...
Videniofthesith Posted February 13, 2011 Author Share Posted February 13, 2011 (edited) I changed it to this scriptname 1aaaFearSong ref Wearer Begin OnEquip set Wearer to GetContainer Wearer.AddSpell aaaSwordeffect3 endif end Begin OnUnequip set Wearer to Getcontainer Wearer.Removespell aaaswordeffect3 endif End and now it adds and removes the spell like it should. Also, just to see, I tried to add the "End" just like you said, it told me it was to many and wouldn't save unless I deleted it. Edited February 13, 2011 by Videniofthesith Link to comment Share on other sites More sharing options...
Hickory Posted February 13, 2011 Share Posted February 13, 2011 I changed it to this scriptname 1aaaFearSong ref Wearer Begin OnEquip set Wearer to GetContainer Wearer.AddSpell aaaSwordeffect3 endif end Begin OnUnequip set Wearer to Getcontainer Wearer.Removespell aaaswordeffect3 endif End and now it adds and removes the spell like it should. Also, just to see, I tried to add the "End" just like you said, it told me it was to many and wouldn't save unless I deleted it. That's because you are adding random keywords with no regard to their placing or meaning. You come to this forum for (what seems like) every script you attempt to make. It is clear that you have no understanding of the CS script language, and I don't see how you are going to learn anything if you dismiss advice just because your hacks don't throw up errors. Link to comment Share on other sites More sharing options...
Videniofthesith Posted February 13, 2011 Author Share Posted February 13, 2011 WOW! I have a ton of scripts that I wrote myself that work just fine for your information, thank you very much. I listen to everything eveyone has to sya and follow the advice they give and I have learned a lot from it, but when for example I tired this script your way by just adding an "end" like you said at the bottom, it told me there was one to many. So when I added looked around and added the two endifs to make up for the extra tab line that was in, like in most other scripts telling it to end that line, and it works. Then I will go with that. So I am VERY sorry that using my "lack of knowledge" got it to work just fine for me. If you don't want to help, then stop responding. You have helped me a lot in the harder scripts that I had NO idea how to write, and I am grateful, but just don't respond to any of my posts if your annoyed that my hack got it to work and following your advice didnt Link to comment Share on other sites More sharing options...
Hickory Posted February 13, 2011 Share Posted February 13, 2011 WOW! I have a ton of scripts that I wrote myself that work just fine for your information, thank you very much. I listen to everything eveyone has to sya and follow the advice they give and I have learned a lot from it, but when for example I tired this script your way by just adding an "end" like you said at the bottom, it told me there was one to many. So when I added looked around and added the two endifs to make up for the extra tab line that was in, like in most other scripts telling it to end that line, and it works. Then I will go with that. So I am VERY sorry that using my "lack of knowledge" got it to work just fine for me. If you don't want to help, then stop responding. You have helped me a lot in the harder scripts that I had NO idea how to write, and I am grateful, but just don't respond to any of my posts if your annoyed that my hack got it to work and following your advice didnt Sigh! Have it your way. Link to comment Share on other sites More sharing options...
Recommended Posts