ID:148289
 
turf/Create/creating_character
layer = MOB_LAYER+150
NewCharacter
icon = 'create.bmp'
Click() usr.NewChar()
density = 1

mob/creating_character

proc/NewChar()
var/char_name
while(!char_name)

var/mob/new_mob //We are declaring a new variable called "new_mob" which will be used in alittle minute
char_name = input("Please put your character name in here.","Name") as null|text //The player makes their name here
it has usr.NewChar:undefined proc, i'm wondering why it isn't defined...
Because you haven't typed in
mob
proc
NewChar()

or any equivalent anywhere in your code.
In response to Garthor
mob/proc/NewChar()
now there is duplicate definition in the code...
In response to YamiGotenks
Well duh, that's because you defined mob/proc/NewChar() AND mob/whatever/proc/NewChar()
In response to Garthor
how do i fix it then?
  • Unindent proc/NewChar() by one tab.
  • Indent the two lines after the while().

    Lummox JR
In response to YamiGotenks
usr is of type /mob. That means it has no access to /mob/whatever variables, procs, verbs, whatever. You figure it out. Useful things might be the istype() proc, and type casting (var/mob/whatever/W = usr). Note that type casting will give a runtime error if, for example, a /mob is type casted to a /mob/whatever and you try to use a /mob/whatever proc.
In response to Lummox JR
that made many errors...
In response to Garthor
it's working better, only one thing, i need load character coding...if u hav some.:-)