ID:145528
 
Stat()
..()
statpanel("Statistics",main statistics)
stat("Name")
stat("Health","[health]/[Maxhealth]")
stat("Experience","[exp]/[maxexp]")
stat("Level",Level)
stat("Strength",src.strength)
stat("Defense",src.defense)
statpanel("inventory")
statpanel("Weapon Stats")
stat("[src.name]")
stat("--------Self--------")
stat("Armor:", "[src.armor]/[src.maxarmor]")
stat("dollars:", "[src.dollars]")
stat("------Weapons------")
stat("Weapon Equipped", "[src.weapon]")
stat("Secondary Weapon:", "[src.secondaryweapon]")
stat("--------Ammo--------")
stat("Primary Clip:","[src.clip]/[src.maxclip]")
stat("Secondary Clip:","[src.oclip]/[src.maxoclip]")
stat("Ammo:", "[src.ammotype]/[src.maxammotype]")
stat("M203/GP25:", "[src.mgpammo]/[src.maxmgpammo]")


Char_creation.dm:10:error: proc definition not allowed inside another proc


Why do I get this error and how can I fix it?
You indented everything after ..()
Don't indent it.
In response to Mysame
I removed the the indent and now i got 26 errors on the 2nd line of coding.

Char_creation.dm:9:error: statistics: missing comma ',' or right-paren ')'
Char_creation.dm:9:error: statistics: expected end of statement
Char_creation.dm:9:error: ): expected }
Char_creation.dm:9:error: location of top-most unmatched {
In response to KrimsonEmpire
In response to Nadrew
statpanel("Statistics",main statistics)
In response to KrimsonEmpire
you need an underscore or you can rewrite it as one word. you can't have a variable as two seperate words.

mainstatistics
main_statistics
In response to Xangelicirex
I got more errors now:
Char_creation.dm:9:error:mainstatistics:undefined var
Char_creation.dm:11:error:health:undefined var
Char_creation.dm:11:error:Maxhealth:undefined var
Char_creation.dm:12:error:exp:undefined var
Char_creation.dm:12:error:maxexp:undefined var
Char_creation.dm:13:error:Level:undefined var
Char_creation.dm:14:error:src.strength:undefined var
Char_creation.dm:15:error:src.defense:undefined var
Char_creation.dm:18:error:src.name:undefined var
Char_creation.dm:20:error:src.armor:undefined var
Char_creation.dm:20:error:src.maxarmor:undefined var
Char_creation.dm:21:error:src.dollars:undefined var
Char_creation.dm:23:error:src.weapon:undefined var
Char_creation.dm:24:error:src.secondaryweapon:undefined var
Char_creation.dm:26:error:src.clip:undefined var
Char_creation.dm:26:error:src.maxclip:undefined var
Char_creation.dm:27:error:src.oclip:undefined var
Char_creation.dm:27:error:src.maxoclip:undefined var
Char_creation.dm:28:error:src.ammotype:undefined var
Char_creation.dm:28:error:src.maxammotype:undefined var
Char_creation.dm:29:error:src.mgpammo:undefined var
Char_creation.dm:29:error:src.maxmgpammo:undefined var
Char_creation.dm:8:error:Stat :undefined proc

Stat()
statpanel("Statistics",mainstatistics)
stat("Name")
stat("Health","[health]/[Maxhealth]")
stat("Experience","[exp]/[maxexp]")
stat("Level",Level)
stat("Strength",src.strength)
stat("Defense",src.defense)
statpanel("inventory")
statpanel("Weapon Stats")
stat("[src.name]")
stat("--------Self--------")
stat("Armor:", "[src.armor]/[src.maxarmor]")
stat("dollars:", "[src.dollars]")
stat("------Weapons------")
stat("Weapon Equipped", "[src.weapon]")
stat("Secondary Weapon:", "[src.secondaryweapon]")
stat("--------Ammo--------")
stat("Primary Clip:","[src.clip]/[src.maxclip]")
stat("Secondary Clip:","[src.oclip]/[src.maxoclip]")
stat("Ammo:", "[src.ammotype]/[src.maxammotype]")
stat("M203/GP25:", "[src.mgpammo]/[src.maxmgpammo]")
In response to KrimsonEmpire
mob
Stat()
statpanel("Statistics")
stat("Name",name)
stat("Health","[health]/[Maxhealth]")
stat("Experience","[exp]/[maxexp]")
stat("Level",Level)
stat("Strength",strength)
stat("Defense",defense)
statpanel("Inventory")
statpanel("Weapon Stats")
stat("--------Self--------")
stat("Armor:", "[armor]/[maxarmor]")
stat("dollars:", "[dollars]")
stat("------Weapons------")
stat("Weapon Equipped", "[weapon]")
stat("Secondary Weapon:", "[secondaryweapon]")
stat("--------Ammo--------")
stat("Primary Clip:","[clip]/[maxclip]")
stat("Secondary Clip:","[oclip]/[maxoclip]")
stat("Ammo:", "[ammotype]/[maxammotype]")
stat("M203/GP25:", "[mgpammo]/[maxmgpammo]")


Wasn't quite sure what your "mainstatistics" was for, so I removed it from the statpanel(). And I have no clue why stat("[src.name]") was under the Weapon Stats panel.

Anyway, I fixed up the stat("Name") to stat("Name",name) so it actually displays src's name.

Now, the reason your getting Undefined var, is because you aren't telling the Stat() proc that it belongs to a mob.

mob/Stat() should fix it up ;) Unless your Player mob is something different, like mob/Player or mob/PC