dragonlord52 Posted February 18, 2009 Author Share Posted February 18, 2009 Can some tell me why this simple little code isn't working? If I take the Type out of the () part of the sub it works fine but when I insert it back in it doesn't work and i can't figure out why. I have reload the scripts, restarted the server, double checked the very small amount of work I have done (I like to make sure things are working step by step, not one gaint step at a time) and for some reason it wont display the message. If someone could explain this to me it would make my day.> '\\\\\\\\\\\\\\\\ QUEST SCRIPT /////////////////////////////////> Sub QuestScript(Index, Type)> Call PlayerMsg(Index, "rawr", 14)> End Sub> '//////////////// END QUEST SCRIPT \\\\\\\\\\\\\\\\\\\\\\\\\\\\\Here is the call command I'm using> ' Executes whenever a scripted NPC does an action.> Sub ScriptedNPC(Index, Script)> Select Case Script> Case 0> Call QuestScript(Index, 0)> Exit Sub> > Case 1> Call QuestScript(Index, 1)> Exit Sub> > Case 2> Call QuestScript(Index, 2)> Exit Sub> > Case Else> Call PlayerMsg(Index, "No NPC script found. Please contact an admin to solve this problem.", WHITE)> Exit Sub> End Select> End SubThanks for helping! Link to comment Share on other sites More sharing options...
Nubbs Posted February 18, 2009 Share Posted February 18, 2009 yea i think you need to leave out "Type" and you need toCall PlayerMsg with the correct case # you want it to be in not in the sub you shouldn't need a sub if you're making a simple quest script… youre using EE 2.7 right? Link to comment Share on other sites More sharing options...
dragonlord52 Posted February 18, 2009 Author Share Posted February 18, 2009 I'm going to need "Type" in there for later so I can't just take it out.What do you mean call PlayerMsg with the proper case #?I am using EE 2.7When this script is done it will be able to make 1 of 3 different .ini files depending on the "Type" you input and that is why I'm making a sub for it. Link to comment Share on other sites More sharing options...
Dark_Marine_123 Posted February 18, 2009 Share Posted February 18, 2009 @Nubbs:> yea i think you need to leave out "Type" and you need to> Call PlayerMsg with the correct case # you want it to be in not in the sub you shouldn't need a sub if you're making a simple quest script… youre using EE 2.7 right?No that should work, try putting the number for type in ""'s…example, Call QuestScript(Index, "2") Link to comment Share on other sites More sharing options...
Nubbs Posted February 18, 2009 Share Posted February 18, 2009 @dragonlord52:> What do you mean call PlayerMsg with the proper case #?did you want it to say "rawr" when you activate Quest index 0,1,2 etc? if so im pretty sure you want it to look like thisCase 0 Call QuestScript(Index, 0) Call PlayerMsg (index,"rawr" 14) Exit Subif not sorry i keep wasting your time lol Link to comment Share on other sites More sharing options...
AdrianC Posted February 18, 2009 Share Posted February 18, 2009 @Nubbs, not thats not what he wants.I'm not sure why this doesn't work. I'll keep looking through it for the next 5 min.EDIT:Try replacing the word "Type" with something else. Like car, or whatever.I don't really see any issues with the code. Link to comment Share on other sites More sharing options...
Dark_Marine_123 Posted February 18, 2009 Share Posted February 18, 2009 @Nubbs:> did you want it to say "rawr" when you activate Quest index 0,1,2 etc? if so im pretty sure you want it to look like this> > Case 0> Call QuestScript(Index, 0)> Call PlayerMsg (index,"rawr" 14)> Exit Sub> > if not sorry i keep wasting your time lolThe Call PlayerMsg(Rawr) stuff is there to show him that it works BEFORE he works anymore on his new Sub, I do the exact same thing AND the exact same playermsg XD Link to comment Share on other sites More sharing options...
Nubbs Posted February 18, 2009 Share Posted February 18, 2009 @Riney:> The Call PlayerMsg(Rawr) stuff is there to show him that it works BEFORE he works anymore on his new Sub, I do the exact same thing AND the exact same playermsg XDoh ok sorry then this is outta my league… for now Link to comment Share on other sites More sharing options...
dragonlord52 Posted February 19, 2009 Author Share Posted February 19, 2009 Alright I changed "Type" to "Dude" and now it works fine. Not sure why that would be, lol.Thanks for the help! Link to comment Share on other sites More sharing options...
vrage Posted February 19, 2009 Share Posted February 19, 2009 @dragonlord52:> Alright I changed "Type" to "Dude" and now it works fine. Not sure why that would be, lol.> > Thanks for the help!Type is a reserved/ keyword in vb6 though. Link to comment Share on other sites More sharing options...
AdrianC Posted February 19, 2009 Share Posted February 19, 2009 @dragonlord52:> Alright I changed "Type" to "Dude" and now it works fine. Not sure why that would be, lol.> > Thanks for the help!Yeah, npRage explained why you had an issue, I just didn't feel like typing it out at the time. Link to comment Share on other sites More sharing options...
dragonlord52 Posted February 20, 2009 Author Share Posted February 20, 2009 I see, I'll have to keep that in mind 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