ID:141651
 
Code:
    trainer2
name = "Trainer 2"
icon = 'mobs.dmi'
icon_state = "t2"
verb
Talk(set src in oview(1))
alert("To learn how to become what you want, click 'Help' in the bottom-right.")
alert("HAVE FUN!")
var/q_train = input("Would you like to do the tutorial?","Tutorial?")in list("Yes","No")
switch(q_train)
if("Yes")
usr.loc=locate(72,2,1)
alert("These are Demi-Hollows, they will not attack back.","Demi")
else if("No")
alert("Teleport to main.")


Problem description:
I get these errors when I compile:

mobs.dm:17:error: src: missing comma ',' or right-paren ')'
mobs.dm:17:error: ): expected }
mobs.dm:17:error: location of top-most unmatched {

Please help, thanks! =)
var/q_train = input("Would you like to do the tutorial?","Tutorial?")in list("Yes","No"))

You forgot another parenthesis ;p
In response to Mizukouken Ketsu
Ahh, thanks!! =D
In response to Mizukouken Ketsu
Mizukouken Ketsu wrote:
var/q_train = input("Would you like to do the tutorial?","Tutorial?")in list("Yes","No"))

You forgot another parenthesis ;

Wait...I still get the same errors...
In response to Hi1
You should use this instead...

switch(alert("Message","Titlebar Title","Option1","Option2"))
if("Option1")
//...
if("Option2")
//...


EDIT
And the line set src in oview(1) doesn't go into the verb as an argument. Put it under the verb definition.
In response to Mizukouken Ketsu
You can just use the 'else' statement when consistently dealing with 2 different options for values. This also means you can use a regular if() statement. >_>

Anyway, the OP's problem is clearly the decision to put the src setting inside the proc's definition parentheses. o_O
In response to Kaioken
Yeah I was seeing things at first, then I noticed that it wasn't a missing parenthesis problem. I didn't notice the set src in oview() thing until a little while ago.
In response to Mizukouken Ketsu
Thanks, now it works. I have another question though. How do you check if its a player or NPC?

if(player)
// code
else
// code


Like that...but the right way. =P
In response to Hi1
I dunno what you're referring to by "it", however:
You can take a mob's key var; if it has one, then it's a player-owned mob. Or, you can check the client var, which if true means a player is currently logged in to that mob. A third method can be used if you have player mobs on a separate path node from NPCs, such as /mob/player, etc, in which case you could use the istype() proc to see if a mob is of that type.

All of those checks are ultimately similar, though not identical. You can pick whichever suits you most, probably the latter two, depending if you can use the last one.
In response to Kaioken
So:

if(client)
// code
if(!client)
// code


?
In response to Hi1
Depends on where you put that and what you're trying to achieve, but taking a general guess, yes. Ultimately that would be:
if(Mob.client)
...
else
...
In response to Kaioken
Okay, I understand now. Thanks! =)