ID:178298
 
heres my code

mob
Login()
spawn()
client.MobCreation()
sleep(10)
client.PetCreation()
..()


client
proc/PetCreation()
var/pet_create = input("It can get lonely on that farm all by yourself. And since i'm in a good mood right now. How would you like to have a pet of your own?.......So do you want a pet or not? Just give me a yah or nay.","Pete's Pet Shop") in list("Yah","Nay")
switch(pet_create)
if("Nay")
usr << alert("Ok....whatever floats your boat.")
return
if("Yah")
var/choose_pet = input("ok. So which kind of pet do you want?","Pete's Pet Shop") in list("Bunny","Dog")
switch(choose_pet)
if("Bunny")
var/bcolor = input("We have differnt colors for the Bunny. Which one would you like?","Pete's Pet Shop") in list("Black Bunny","White Bunny")
switch(bcolor)
if("Black Bunny")
mob/pet.name = input("Now you get to name your pet!","Pete's Pet Shop") as null|text
usr.pet += 1
new /mob/pet/bunny/black(locate(3,3,1))


client
proc/MobCreation()
var/new_mob
var/mob_create = input("Choose your gender","Create Character") in list("Boy","Girl")
switch(mob_create)
if("Guy")
src:name = input("What is you name again? I forgot it.","Create Character") as null|text
new_mob = new /mob/PC/Vegeta(locate(1,1,1))
src:client:mob = new_mob

problems
1.The pet shows up and everything but it doesn't set his name.
2.Once I get to Boy on the MobCreation() proc it doesn't let me name the character.
3.It also gives me this runtime error after I choose the Boy-
runtime error: undefined variable /client/var/client
proc name: MobCreation (/client/proc/MobCreation)
source file: characterhandling.dm,47
usr: LittleKid15 (/mob)
src: LittleKid15 (/client)
call stack:
LittleKid15 (/client): MobCreation()
LittleKid15 (/mob): Login()

this is what is not letting the mob show up on the map even though I can still move around and everything.

Help is REALLY needed and appreciated
thanx,
Little Kid
whoa... that is a pretty big piece of code to be posting, you might get more replies if you shorten it.
I think your biggest problem is that "Guy" is not "Boy" or "Girl"
In response to Garthor
Garthor wrote:
I think your biggest problem is that "Guy" is not "Boy" or "Girl"

I don't know what happened there, lol, I fixed it though, anyways thats not why the code isn't working, i was messing around and I forgot to change that back before I posted the code and thats why that happened.
In response to Garthor
Garthor wrote:
I think your biggest problem is that "Guy" is not "Boy" or "Girl"

I don't know what happened there, lol, I fixed it though, anyways thats not why the code isn't working, i was messing around and I forgot to change that back before I posted the code and thats why that happened.