ID:146975
 
Bah, coming back from a rust of not coding is making me forget how to do the easy stuff. If anyone could help me out here It would be much appreciated.

                if ("Mage")
switch(alert("You have selected to be a Human Mage, do you wish to continue?","Selection","Yes","No"))
if ("Yes")
..()
if ("No")
usr.HSelection()

Instead of having "..()" under the Yes part, I want it to make a /mob/humans/Mage.

 
if ("Mage")
switch(alert("You have selected to be a Human Mage, do you wish to continue?","Selection","Yes","No"))
if ("Yes")
src.client.mob = new mob/humans/Mage()
if ("No")
usr.HSelection()



Meh, not sure if thats going to work, but if I recall right it should? If it doesnt ignore this and sorry for the inconvience.

In response to XxDohxX
XxDohxX wrote:
>  
> if ("Mage")
> switch(alert("You have selected to be a Human Mage, do you wish to continue?","Selection","Yes","No"))
> if ("Yes")
> src.client.mob = new mob/humans/Mage()
> if ("No")
> usr.HSelection()
>

Meh, not sure if thats going to work, but if I recall right it should? If it doesnt ignore this and sorry for the inconvience.

That shouldn't work, try this:
  
if ("Mage")
switch(alert("You have selected to be a Human Mage, do you wish to continue?","Selection","Yes","No"))
if ("Yes")
src.client.mob = new/mob/humans/Mage()
if ("No")
usr.HSelection()



notice the difference? new/mob/humans/Mage()
In response to Lenox
Lenox wrote:
XxDohxX wrote:
> >  
> > if ("Mage")
> > switch(alert("You have selected to be a Human Mage, do you wish to continue?","Selection","Yes","No"))
> > if ("Yes")
> > src.client.mob = new mob/humans/Mage()
> > if ("No")
> > usr.HSelection()
> >

Meh, not sure if thats going to work, but if I recall right it should? If it doesnt ignore this and sorry for the inconvience.

That shouldn't work, try this:
>   
> if ("Mage")
> switch(alert("You have selected to be a Human Mage, do you wish to continue?","Selection","Yes","No"))
> if ("Yes")
> src.client.mob = new/mob/humans/Mage()
> if ("No")
> usr.HSelection()
>

notice the difference? new/mob/humans/Mage()



Thanks.
In response to XxDohxX
wait, that'll just switch to the mob if it's already made, I think..

EDIT: Come to think of it, XxDohxX is right, for CREATING..(instead of switching to a current mob..)
In response to Lenox
Yeah i tried the src.client.mob = new mob/humans/Mage() the first time and it crashed when i was originally making this then i aksed for help. it crashed atgain when i tried the src.client.mob = new/mob/humans/Mage()part. thanks for helping i got it to work once but something happned that i can work around.