ID:145485
 
Code:
Create_Character()
var/mob/newmob
var/newname=input("Welcome to [world.name]. Choose a Name for your RPing Character","Name")as text
switch(input("What is your Gender?","Gender")in list("Male","Female"))
if("Male")
newmob=new/mob/charas/Male()
if("Female")
newmob=new/mob/charas/Female()
newmob.name=newname
usr.client.mob=newmob
switch(input("Choose a Village.","Village of Birth")in list("Hidden Leaf","Hidden Sand","Hidden Mist","Hidden Rain","Hidden Water","Hidden Grass","Hidden Cloud","Hidden Stone","Hidden Earth","Hidden Snow"))
if("Hidden Leaf")
usr.from="Hidden Leaf"
usr.V=1
if("Hidden Sand")
usr.from="Hidden Sand"
usr.V=2
usr.chance+=rand(1,50)
if("Hidden Mist")
usr.from="Hidden Mist"
usr.V=3
if("Hidden Rain")
usr.from="Hidden Rain"
usr.V=4
if("Hidden Water")
usr.from="Hidden Water"
usr.V=5
if("Hidden Grass")
usr.from="Hidden Grass"
usr.V=6
if("Hidden Cloud")
usr.from="Hidden Cloud"
usr.V=7
if("Hidden Stone")
usr.from="Hidden Stone"
usr.V=8
if("Hidden Earth")
usr.from="Hidden Earth"
usr.V=9
if("Hidden Snow")
usr.from="Hidden Snow"
usr.V=10
return
if(usr.V<=1)
switch(input("Clan","Blood Line")in list("Uchiha","Hyuuga","Inuzuka","Akamichi","Nara","Kaguya","Non-Clan"))
if("Uchiha")
usr.clan="Uchiha"
usr.MCP+=rand(5,50)
if("Hyuuga")
usr.clan="Hyuuga"
usr.MCP+=rand(5,70)
if("Inuzuka")
usr.clan="Inuzuka"
if("Akamichi")
usr.clan="Akamichi"
if("Nara")
usr.clan="Nara"
if("Kaguya")
usr.clan="Kaguya"
usr.MSP+=50
usr.MCP=1
if("Non-Clan")
usr.clan="Non-Clan"
usr.Tai+=10
usr.MSP+=50
usr.MCP=1
if(usr.V=2&&usr.chance<=30)
usr<<"the Tsuchikage has inplanted a demon within you"
usr<<"you cry as your body changes bittersweat in stats"
usr.MCP=200
usr.MSP=50
usr.MHP=200
if(usr.V=3)
switch(input("Clan","Blood Line")in list("Haku","Non-Clan"))
if("Haku")
usr.clan="Haku"
if("Non-Clan")
usr.clan="Non-Clan"
if(usr.V=6)
switch(input("Clan","Blood Line")in list("Chuuga","Non-Clan"))
if("Chuuga")
usr.clan="Chuuga"
if("Non-Clan")
usr.clan="Non-Clan"


Problem description:

invalid error on if(usr.V=1)
OMGWTFBBQ?

Okay, several things wrong -
1 - I can't read blocks of code when they aren't ACTUALLY INSIDE THE FREAKING <DM> TAGS!

2 - What in all hell is the error? When does it occur? On what line?

3 - Why can't you just do this? (Assuming the new mob is stored as var/mob/newmob)
var/f=input(blah blah blah) in list(generic stuff)
newmob.from=f


See? Much easier.

4 - I suspect you shouldn't be using usr in here - it's probably a proc.

EDIT:
Okay, that's better.

Still, what in all hell is an invalid error? You haven't provided any context there.

Your problem is that you've used = instead of == for comparision.
In response to Jp
well basicly thats the problem, in that spot where if(usr.V=1) stands in, there is an invalid error
In response to LeeZein
welll thats all it says, maybe i made a mistake from the create_character proc and effected there, well idk ive only been coding for a few months, and it still confuses me
In response to LeeZein
It doesn't read 'Invalid error'. Try looking again.

And I've already told you what the problem was - you're using = instead of == in the if().

Also, you might want to look up the 'prob()' procedure.
In response to Jp
XD oh i am so stupid its invalid expression, k ill try what u said
In response to LeeZein
O.O everything is the same still invalid expression, >< what did i do...ill have to re-check everything, because i dont get the expression thing
In response to LeeZein
if(usr.V==number)
In response to Mysame
ya thats what i did
In response to LeeZein
this isnt working for me
i just think in that space there is an invalid expression, i tried what u guys said but still the same, is there anyway i can fix it because i tried everything and it just made things worse