ID:178448
 
Ok first off, my code compiles fine and everything but when it runs in the game it says:

runtime error: unexpected stat
proc name: Stat (/mob/Stat)
usr: Jinks (/mob)
src: Jinks (/mob)
call stack:
Jinks (/mob): Stat()
Jinks (/mob): CharacterCreation()
Jinks (/mob): Login()

ok also I just got my character creation thing to work but after it's done my character icon doesn't apear. Please consider the following code:

var/savefile/SaveFile = new("players.sav")

world
view = 5
turf
floor
icon = 'floor.dmi'
wall
icon = 'wall.dmi'
density = 1
opacity = 1
mob
proc/CharacterCreation()
player_name = input("Please put your character name in here.","Name", src.ckey) as null|text
player_race = input(src,"What race would you like to be?") in list("Saiya-Jin")
if(player_name == null)
src.Logout()
if(player_race == "Saiya-Jin")
new/mob/saiyan
usr.loc = locate(1,1,1)
usr.StatCheck()
usr.Stat()
Login()
SaveFile.cd = "/"
if(ckey in SaveFile.dir)
SaveFile.cd = ckey
Read(SaveFile)
usr << "Welcome back, [name]!"
world << "[name] has rejoined the world!"
else
usr.CharacterCreation()
usr << "Welcome, [name]!"
..()
var/player_name = null
var/player_race = null
var/hp = null
var/ki = null
var/enrgy = null
var/str = null
var/money = null
var/ctarg = null
var/ctech = null
var/tnl = null
var/spd = null
proc/StatCheck()
if(player_race == "Saiya-Jin")
player_name = player_name
player_race = player_race
hp = 100
ki = 20
enrgy = 30
spd = 1
str = 5
money = 0
ctarg = null
ctech = null
tnl = 100
Stat()
stat(usr.icon)
stat("Name:", player_name)
stat("Race:", player_race)
stat("Health:", hp)
stat("Ki:", ki)
stat("Energy:", enrgy)
stat("Strength:", str)
stat("Speed:", spd)
stat("Zenni:", money)
stat("Current Target:", ctarg)
stat("Current Technique:", ctech)
stat("To next level:", tnl)
saiyan
icon = 'player.dmi'
Here's the line:

stat(usr.icon)

You need the name of the statpanel, followed by what you wish to appear there. An icon is not a valid name for a statpanel.

In response to Skysaw
Skysaw wrote:
Here's the line:

stat(usr.icon)

You need the name of the statpanel, followed by what you wish to appear there. An icon is not a valid name for a statpanel.

how do I get the users icon to apear in the stat panel for his icon?
In response to Jinks
mob/Stat() 
statpanel("Stats")
stat(src)


-Kappa the Imp