ID:149508
 
I know I have alot of forum posts, but 50% are unanswered, and since I cannot fix the battle system in TZU I must make new projects, like TZ4, now THAT has an error, observe.
world
name = "The Zone 4:Power Surge"
mob = /mob/choose_chara
mob
Logout()
world<<"[usr] leaves!"
del(src)
verb
say(msg as text)
world<<"[usr]:[msg]"
choose_chara
var/mob/character
Login()
var/charactername = input("What is your name?","Name",src.key)
world<<"[usr] joins!"
switch(input("Pick a gender")in list("male","female"))
if("male")
usr.icon_state = "male"
switch(input("Pick a class!")in list("Hero","Wizard","Sage"))
if("Hero")
character = new/mob/Hero()
usr.loc = locate(2,2,1)
if("Wizard")
character = new/mob/Wizard()
usr.loc = locate(2,2,1)
if("Sage")
character = new/mob/Sage()
usr.loc = locate(2,2,1)
if("female")
usr.icon_state = "female"
switch(input("Pick a class!")in list("Hero","Wizard","Sage"))
if("Hero")
character = new/mob/Hero()
usr.loc = locate(2,2,1)
if("Wizard")
character = new/mob/Wizard()
usr.loc = locate(2,2,1)
if("Sage")
character = new/mob/Sage()
usr.loc = locate(2,2,1)

character.name = charactername
src.client.mob = character
del(src)
Wizard
icon = 'Wizard.dmi'
Hero
icon = 'Hero.dmi'
Sage
icon = 'Sage.dmi'
turf
grass
grass
icon = 'Grass.dmi'

The error is: Heres what it says when I login:
Welcome BYOND! (Dream Seeker release 322)
Connecting to file://C:\Program Files\Jaces Folder\BYOND\bin\untitled\untitled.dmb.
You've got upgrades!
FireEmblem joins!
Looking for some action? Check out the hub.
Pager on.
FireEmblem leaves!

And I dont see my icon! Plz help!
since you have genders you Prob have icon state correct?
In response to Strange Kidd
yes, each icon has 2 icon states, male and female
In response to FireEmblem
well then do this

Wizardfemale
icon = 'Wizard.dmi'
icon_state="female"
Herofemale
icon = 'Hero.dmi'
icon_state="female"
Sagefemale
icon = 'Sage.dmi'
icon_state="female"

etc exept now make icon_state="male"


Wizardmale
icon = 'Wizard.dmi'
Heromale
icon = 'Hero.dmi'
Sagemale
icon = 'Sage.dmi'
In response to Strange Kidd
It works now but this is the other Runtime error:
<font color = red>
Welcome BYOND!  (Dream Seeker release 322)
Connecting to file://C:\Program Files\Jaces Folder\BYOND\bin\untitled\untitled.dmb.
You've got upgrades!
Guest joins!
Guest leaves!
In response to FireEmblem
what Runtime error?
Since your making character your client.mob you probably want to apply all those changes to it. Change this:

character = new/mob/Sage()
usr.loc = locate(2,2,1)

to:

character = new /mob/Sage(locate(2,2,1))

I'm not sure what usr would be in this case but it doesn't really matter because it seems like you want to move the character. Then you also want to change the character's icon_state, not the usr's icon_state:
character.icon_state = "female"
In response to Strange Kidd
<font size = red>
Welcome BYOND!  (Dream Seeker release 322)
Connecting to file://C:\Program Files\Seans Folder\BYOND\bin\untitled\untitled.dmb.
You've got upgrades!
Guest joins!
Guest leaves!
</font>It immidiately says I leave as soon as i join!
In response to FireEmblem
Whenever you "leave" a mob you logout. You leave your initial character during login and enter character.
In response to English
so........how can I fix that?
You've defined the Logout() behavior under mob, so it will affect all mobs. What you actually want it to do is affect all mobs, except the "dummy mob" type of choosing_chara, or whatever you called your login mob.

So, under choosing_chara, put this:

Logout()
del src

Now, when choosing_chara is "logged out", it will do nothing but delete the choosing_chara mob.