Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Okay I don't get it…


dragonlord52
 Share

Recommended Posts

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 Sub

Thanks for helping!
Link to comment
Share on other sites

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.7

When 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

@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

@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 this

Case 0
        Call QuestScript(Index, 0)
        Call PlayerMsg (index,"rawr" 14)
        Exit Sub

if not sorry i keep wasting your time lol
Link to comment
Share on other sites

@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 lol

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...