ID:147905
 
OK... there are no errors mentioned about this code, yet it is doing nothing... It won't even show up at start...

mob/Login()
src << ""
world << "[src.name] has just entered '[world.name]'!"

client/var/tmp

world
name = "TextMUD Engine"

mob/other/creating_character
Login()
spawn()
src.CreateCharacter()
proc
CreateCharacter()

var/newCharacterChoice = "New Character"
var/list/menu = new()
menu += newCharacterChoice

var/result = input("Character Creation", "WoE") in menu

if (result == newCharacterChoice)
src.CreateNewCharacter()

mob/other/creating_character/proc
CreateNewCharacter()
var/prompt_title = "Character Creation"
var/help_text = "What is your name?"
var/default_value = ""
var/char_name = input(src, help_text, prompt_title, default_value) as null|text

if (!char_name)
src.CreateCharacter()
return
Well what i understand, is that "[src.name] has just entered '[world.name]'!" still appears, but the character creation isnt working. To get the character creation working, you have specified another type of mob login to handle it, but you have not made the client into that type of mob anywhere. Just include
world/mob = /mob/other/creating_character
in your code, then hopefully the character creation should work. And also just move the "[src.name] has just entered '[world.name]'!" login section under the other mob login section aswell.
In response to Lazyboy
client
script = "<STYLE>BODY {background: black; color: white} IMG.icon{width:32;height:32}</STYLE>"
mob/Login()
src << ""
world/mob = mob/other/creating_character

client/var/tmp

world
name = "TextMUD Engine (Someone please come and tell me if you get host verbs)"
mob = mob/other/creating_character

mob/other/creating_character
Login()
spawn()
src.CreateCharacter()
proc
CreateCharacter()

var/newCharacterChoice = "New Character"
var/list/menu = new()
menu += newCharacterChoice

var/result = input("Character Creation", "WoE") in menu

if (result == newCharacterChoice)
src.CreateNewCharacter()

mob/other/creating_character/proc
CreateNewCharacter()
var/prompt_title = "Character Creation"
var/help_text = "What is your name?"
var/default_value = ""
var/char_name = input(src, help_text, prompt_title, default_value) as null|text

if (!char_name)
src.CreateCharacter()
return
world << "[src.name] has just entered '[world.name]'!"


TextMudEngine.dm:5:error:mob:undefined var
TextMudEngine.dm:5:error:other:undefined var
TextMudEngine.dm:5:error:creating_character:undefined var
TextMudEngine.dm:11:error:mob/other/ creating_character:undefined var
TextMudEngine.dm:5:error:world/mob:undefined var


OK, what else do I put? just to let you know this is for a text game...
In response to Blueseed15
Blueseed15 wrote:
mob/Login()
src << ""
world/mob = mob/other/creating_character

Just delete this section above, as it is not needed. (see below)

world
name = "TextMUD Engine (Someone please come and tell me if you get host verbs)"
mob = mob/other/creating_character

Use this declaration as it will make the client use this mob automatically. Also, the 'mob/other/creating_character' needs another / at the start, because it is a path. So use '/mob/other/creating_character' instead (without the quote marks).
So the fixed code is just
world
src << ""
name = "TextMUD Engine (Someone please come and tell me if you get host verbs)"
mob = /mob/other/creating_character
In response to Lazyboy
Did what you said... got:

TextMudEngine.dm:8:error:<< :bad or missplaced statement
TextMudEngine.dm:8:error:src:undefined var
In response to Blueseed15
Sorry about that, put the src << "", in the creating_character login, and that should fix it back up.
mob/other/creating_character
Login()
src << ""
spawn()
src.CreateCharacter()
proc
CreateCharacter()

var/newCharacterChoice = "New Character"
var/list/menu = new()
menu += newCharacterChoice

var/result = input("Character Creation", "WoE") in menu

if (result == newCharacterChoice)
src.CreateNewCharacter()
And delete the 'src << ""' in the world part.
In response to Lazyboy
Hmm... still doesn't work properly... still keeps name same as key