openeyestudios Posted April 10, 2009 Author Share Posted April 10, 2009 **Okay so I wanted to test someting:**_**Sub UseItem(Index, ItemNum, ItemType, SlotNum)If ItemNum = 2 ThenCall TakeItem(Index, 2, 1)Call PlayerMsg(Index, "Does It Work?", 4)End IfEnd Sub**_**However there is a problem:****When I use item no.2 … nothing happens only that my screen blinks. Im not sure why.****This is where I placed the sub:**_' Tests scripts up to the location of Sub TestMain(Index). **Sub UseItem(Index, ItemNum, ItemType, SlotNum)If ItemNum = 2 ThenCall TakeItem(Index, 2, 1)Call PlayerMsg(Index, "Does It Work?", 4)End IfEnd Sub** ' Leave this sub at the bottom to test the entire script file.Sub TestMain(Index)Call PlayerMsg(Index, "Scripts are working properly.", BRIGHTGREEN)End Sub_**Please help! :azn:** Link to comment Share on other sites More sharing options...
Eviltyphoon Posted April 10, 2009 Share Posted April 10, 2009 Did you call the script? Link to comment Share on other sites More sharing options...
openeyestudios Posted April 10, 2009 Author Share Posted April 10, 2009 What do you mean, how do I do that? :huh: Link to comment Share on other sites More sharing options...
cheatking Posted April 10, 2009 Share Posted April 10, 2009 call useItem(Index, ItemNum, ItemType, SlotNum) Link to comment Share on other sites More sharing options...
openeyestudios Posted April 10, 2009 Author Share Posted April 10, 2009 Where would I put that? Link to comment Share on other sites More sharing options...
Eviltyphoon Posted April 10, 2009 Share Posted April 10, 2009 I suggest you read some tutorials. Link to comment Share on other sites More sharing options...
openeyestudios Posted April 10, 2009 Author Share Posted April 10, 2009 Ive read alot thankyou. Link to comment Share on other sites More sharing options...
Luneth Posted April 10, 2009 Share Posted April 10, 2009 Well is this an item? A command? A spell?Thats how you call it, if its a command than you would put it in the command sub, an item the item sub and so on and so forth. It makes a difference. Link to comment Share on other sites More sharing options...
Admiral Refuge Posted April 10, 2009 Share Posted April 10, 2009 Did you define ItemNum as a variable previously? Link to comment Share on other sites More sharing options...
openeyestudios Posted April 10, 2009 Author Share Posted April 10, 2009 This is what ive got now:Sub UseItem(Index, ItemNum, ItemType, SlotNum) Call UseItem(Index, ItemNum, ItemType, SlotNum)If ItemNum = 1 ThenCall TakeItem(Index, 1, 1)End IfEnd Subyet still not working :sad: Link to comment Share on other sites More sharing options...
Admiral Refuge Posted April 10, 2009 Share Posted April 10, 2009 Two things… First off, why do you have Call UseItem(Index, ItemNum, ItemType, SlotNum)?Also, when the script tries to compare ItemNum to 1, it won't know what to do because you never told it what ItemNum was in the first place.Also, have you installed the TakeItem sub before? Link to comment Share on other sites More sharing options...
dg1423 Posted April 10, 2009 Share Posted April 10, 2009 /facepalmUse Sub ScriptedItem, find it in your main. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now