k i think we're gettig somewhere...the indentation was an error of mine whe i copied/pasted it...The last 2 lines WERE a mistake on the post, don't know why i did that... nad this is debug message i got...
Debug: Click() called for /turf/Create/creating_character/NewChar successfully.
And if you were wondering, this is my fixed code that needed indentation:
turf/Create/creating_character/NewChar
layer = MOB_LAYER+150
icon = 'create.bmp'
Click()
// this is called "type-casting"
usr << "Debug: Click() called for [type] successfully."
var/mob/creating_character/M = usr
// this will check to see if M is the type it's supposed to be
if(!istype(M)) return
// it's the right type, so call NewChar().
M.NewChar()
1
2
In response to Lummox JR
|
|
In response to YamiGotenks
|
|
YamiGotenks wrote:
k i think we're gettig somewhere...the indentation was an error of mine whe i copied/pasted it...The last 2 lines WERE a mistake on the post, don't know why i did that... nad this is debug message i got... Excellent. We definitely are making progress. Assuming the other debug message is in the beginning of mob/NewChar() (before var/char_name and all that), then the problem must be somewhere in here: Click() world usr << "Debug: usr is type [usr.type]" Also if you could post the mob/NewChar() proc and both your Login() procs as they stand now, that would help. Lummox JR |
In response to Lummox JR
|
|
This is the new debug message:
Debug: Click() called for /turf/Create/creating_character/NewChar successfully. Debug: usr is type /mob/DM Here is the Login and NewChar codes: mob/Login() src.loc=locate(7,7,10) src.energylevel = src.maxenergylevel mob/creating_character Login() ..() src.loc=locate(37,27,1) world << "[usr] has just entered '[world.name]'!" usr.sight = 1 //src.Create() //This tells the src to lookup "CreateCharacter" proc/NewChar() usr << "Debug: NewChar() called by Click()." var/mob/new_mob var/char_name while(!char_name) char_name = input("Please put your character name in here.","Name") as null|text //The player makes their name here var/char = input(src,"Pick your character!") in list("Half-Demon","Human","Demon") //The player chooses his/her character here switch(char) if("Half-Demon") new_mob = new /mob/player/HalfDemon/InuYasha //Looking up the path "/mob/player/human" new_mob.energylevel = 10 new_mob.maxenergylevel = 10 new_mob.maxstamina = 100 new_mob.purity = 2 new_mob.will = 5 new_mob.honor = 3 if("Human") new_mob = new /mob/player/Human/Kagome //Looking up the path "/mob/player/monkey" new_mob.energylevel = 5 new_mob.maxenergylevel = 5 new_mob.maxstamina = 100 new_mob.will = 5 new_mob.honor = 5 new_mob.purity = 5 if("Demon") new_mob = new /mob/player/Demon/Naraku new_mob.energylevel = 50 new_mob.maxenergylevel = 50 new_mob.maxstamina = 100 new_mob.will = 5 new_mob.honor = 5 new_mob.purity = 1 Also the world mob = /mob/creating_character thing is included with the view and the games name see: world mob = /mob/creating_character view = 6 name = "InuYasha Version 3" hub = "YamiGotenks.InuYasha" |
In response to YamiGotenks
|
|
YamiGotenks wrote:
This is the new debug message: Bingo! This is real progress. You've just established that usr is not the type it's supposed to be. I have a guess: There's a mob somewhere on your map, of type /mob/DM. If there is you're going ot have to find it and delete it. (The best way to see where it is is to open up your map file in a text editor, and search for /mob/DM. Remove that item from the list of things you see there.) If there is no such mob on your map, or you've deleted it, then you need to search all your files for DM. Wherever you find mob/DM defined, or created manually, show me those pieces of code. Lummox JR |
In response to Lummox JR
|
|
This is the only mob/DM i found
#define MASTER_KEY "YamiGotenks" mob/DM key = MASTER_KEY |
In response to YamiGotenks
|
|
YamiGotenks wrote:
This is the only mob/DM i found That's the problem right there. When you log on, a type of mob with your key is found, so the game assigns that mob type to you instead of the standard world.mob value. If you delete this that problem should vanish. If you were hoping to use this to do admin stuff, that would be easier to handle in mob/Login() anyway. mob/Login() Lummox JR |
In response to Lummox JR
|
|
I deleted that coding...and now the scren is COMPLETELY BLACK...i try to use a GM Teleport verb but the screen is still black...Plz respond to tell me what coding you need to see...
|
In response to YamiGotenks
|
|
..()
|
In response to FeLeS_CeLeR
|
|
where would i put that? On the bottom of the login code?
|
In response to YamiGotenks
|
|
When i create a new character, the character doesn't go anywhere... this is the message i got....Debug: new_mob is /mob/player/HalfDemon/InuYasha, at 0,0,0...sorry i didn't give much info but i gtg bye
|
1
2
You did put the code in the right place here. There's a tab problem, though; the lines beneath Click() should be indented beneath it, yet they appear to its left. You have to be careful about mixing spaces and tabs.
BYOND might be interpreting this correctly anyway, if you have as many spaces as you would tabs, but to be safe I'd unindent those lines and re-indent them (with tabs) to put them just past Click().
I notice those last two lines are repeated. I wonder if you accidentally have two of the same entry by mistake.
There's a way to find this out. In the Click() proc, before you even do the var/mob/creating_character/M=usr line, put in this temporarily:
usr << "Debug: NewChar() called by Click()."
Lummox JR