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
ID:147905
Oct 5 2003, 6:17 am
|
|
Oct 5 2003, 6:53 am
|
|
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
|
In response to Lazyboy
|
|
client 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() Just delete this section above, as it is not needed. (see below) world 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 |
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 |
In response to Lazyboy
|
|
Hmm... still doesn't work properly... still keeps name same as key
|