ID:147523
 
I used Ham-Warrior's tutorial to make my whole login thing. But instead of giving the pop up asking for my name, i get a blank screen and nothing comess up!
Here is my login code:

mob/create_character
var/mob/character
Login()
var/charactername = input("Hello, Pick a name for your character, something you wish for people to call you in the game.","Character Name?")
character = /mob/Player()
src.client.mob = character
character.name = charactername
character.loc=locate (/turf/start)
world<<"<B>[character] has logged in!"
del(src)
..()


HELP
        character.loc=locate (/turf/start)


Remove /turf/start and put the coordinates you want to go.
In response to XzDoG
umm...
i have a turf i defined for that purpose,but ill try it

and it didnt work...I still get a black screen
                    character.sight = 0


Just a guess. but try it
In response to Tabu34
i think that the problem lies in here somewhere, but i cant decipher it. I need someone to help me figure out what it all means, and what i need from it.Here it is:

#include <deadron/basecamp>

#define BASE_MENU_CREATE_CHARACTER "Create New Character"
#define BASE_MENU_DELETE_CHARACTER "Delete Character"
#define BASE_MENU_CANCEL "Cancel"
#define BASE_MENU_QUIT "Quit"


client/var/tmp
base_num_characters_allowed = 1
base_autoload_character = 1
base_autosave_character = 1
base_autodelete_mob = 1
base_save_verbs = 1

mob
var/tmp
base_save_allowed = 1
base_save_location = 1

var/list/base_saved_verbs

proc/base_InitFromSavefile()
return

Write(savefile/F)
..()

if (base_save_location && world.maxx)
F["last_x"] << x
F["last_y"] << y
F["last_z"] << z
return

Read(savefile/F)
..()

if (base_save_location && world.maxx)
var/last_x
var/last_y
var/last_z
F["last_x"] >> last_x
F["last_y"] >> last_y
F["last_z"] >> last_z
var/destination = locate(last_x, last_y, last_z)
Move(destination)
world<<"<B>[usr] has logged in!"
return

mob/BaseCamp
base_save_allowed = 0
Login()
RemoveVerbs()
return

Stat()
return

Logout()
del usr
return

proc/RemoveVerbs()
for (var/my_verb in verbs)
verbs -= my_verb

mob/BaseCamp/FirstTimePlayer
proc/FirstTimePlayer()
return 1

world
mob = /mob/BaseCamp/ChoosingCharacter

mob/BaseCamp/ChoosingCharacter
Login()
spawn()
ChooseCharacter()
return ..()

proc/ChooseCharacter()
var/list/available_char_names = client.base_CharacterNames()
var/list/menu = new()
menu += available_char_names

if (length(available_char_names) < client.base_num_characters_allowed)
if (client.base_num_characters_allowed == 1)
client.base_NewMob()
del(src)
return
else
menu += BASE_MENU_CREATE_CHARACTER

if (length(available_char_names))
menu += BASE_MENU_DELETE_CHARACTER

menu += BASE_MENU_QUIT

var/default = null
var/result = input(src, "Who do you want to be today?", "Welcome to [world.name]!", default) in menu

switch(result)
if (0, BASE_MENU_QUIT)
del(src)
return

if (BASE_MENU_CREATE_CHARACTER)
client.base_NewMob()
del(src)
return

if (BASE_MENU_DELETE_CHARACTER)
DeleteCharacter()
ChooseCharacter()
return

var/mob/Mob = client.base_LoadMob(result)
if (Mob)
del(src)
else
ChooseCharacter()

proc/DeleteCharacter()
var/list/available_char_names = client.base_CharacterNames()
var/list/menu = new()
menu += available_char_names

menu += BASE_MENU_CANCEL
menu += BASE_MENU_QUIT

var/default = null
var/result = input(src, "Which character do you want to delete?", "Deleting character", default) in menu

switch(result)
if (0, BASE_MENU_QUIT)
del(src)
return

if (BASE_MENU_CANCEL)
return

client.base_DeleteMob(result)
ChooseCharacter()
return



client
var/tmp/savefile/_base_player_savefile

New()
if (base_autoload_character)
base_ChooseCharacter()
base_Initialize()
return
return ..()

Del()
if (base_autosave_character)
base_SaveMob()

if (base_autodelete_mob)
del(mob)
return ..()


proc/base_PlayerSavefile()
if (!_base_player_savefile)
var/start = 1
var/end = 2
var/first_initial = copytext(ckey, start, end)
var/filename = "players/[first_initial]/[ckey].sav"
_base_player_savefile = new(filename)
return _base_player_savefile


proc/base_FirstTimePlayer()
var/mob/BaseCamp/FirstTimePlayer/first_mob = new()
first_mob.name = key
first_mob.gender = gender
mob = first_mob
return first_mob.FirstTimePlayer()


proc/base_ChooseCharacter()
base_SaveMob()

var/mob/BaseCamp/ChoosingCharacter/chooser

var/list/names = base_CharacterNames()
if (!length(names))
var/result = base_FirstTimePlayer()
if (!result)
del(src)
return

chooser = new()
mob = chooser
return

if (base_num_characters_allowed == 1)
base_LoadMob(names[1])
return

chooser = new()
mob = chooser
return


proc/base_CharacterNames()
var/list/names = new()
var/savefile/F = base_PlayerSavefile()

F.cd = "/players/[ckey]/mobs/"
var/list/characters = F.dir
var/char_name
for (var/entry in characters)
F["[entry]/name"] >> char_name
names += char_name
return names


proc/base_NewMob()
base_SaveMob()
var/mob/new_mob
new_mob = new world.mob()
new_mob.name = key
new_mob.gender = gender
mob = new_mob
_base_player_savefile = null
return new_mob


proc/base_SaveMob()
if (!mob || !mob.base_save_allowed)
return

if (base_save_verbs)
mob.base_saved_verbs = mob.verbs

var/savefile/F = base_PlayerSavefile()

var/mob_ckey = ckey(mob.name)

var/directory = "/players/[ckey]/mobs/[mob_ckey]"
F.cd = directory
F["name"] << mob.name
F["mob"] << mob
_base_player_savefile = null


proc/base_LoadMob(char_name)
var/mob/new_mob
var/char_ckey = ckey(char_name)
var/savefile/F = base_PlayerSavefile()
_base_player_savefile = null

F.cd = "/players/[ckey]/mobs/"
var/list/characters = F.dir
if (!characters.Find(char_ckey))
world.log << "[key]'s client.LoadCharacter() could not locate character [char_name]."
mob << "Unable to load [char_name]."
return null

F["[char_ckey]/mob"] >> new_mob
if (new_mob)
mob = new_mob
new_mob.base_InitFromSavefile()
if (base_save_verbs && new_mob.base_saved_verbs)
for (var/item in new_mob.base_saved_verbs)
new_mob.verbs += item
return new_mob
return null


proc/base_DeleteMob(char_name)
var/char_ckey = ckey(char_name)
var/savefile/F = base_PlayerSavefile()

F.cd = "/players/[ckey]/mobs/"
F.dir.Remove(char_ckey)
In response to Tabu34
im almost 100% sure that code works fine seeing as almost everyone uses it as there login code
In response to N1ghtW1ng
ok...but when it is on, i get a black screen and when it is off my character doesnt have an icon!!
help
In response to Tabu34
im not sure but

character = /mob/Player()

u don need the () maybe that will help also wat is in mob/Player?
In response to N1ghtW1ng
ok... here is all my code:

//This is a test world started by Tabu34 on 3/15/04 and yet to be completed...
mob/create_character
var/mob/character
Login()
var/charactername = input("Hello, Pick a name for your character, something you wish for people to call you in the game.","Character Name?")
character = new/mob/Player
src.client.mob = character
character.name = charactername
character.loc=locate (1,1,1)
world<<"[character] has logged in!"
del(src)
..()
mob
var/level=1
var/exp=0 // experience (total)
var/expNeeded= 15 // experience for the next level
var/maxHP= 20
var/expgained= 3
var/Spawned_By
var/HP = 30 //declares a new variable called HP, with a value of 30
var/wealth = 0 //total money
var/UHP = 40 //new var Hp for user
var/maxHp = 30 //max hp for bug
var/maxUHP = 40 //max hp for user
var/strength = 3//change to the amount you want the player to have
var/defense = 2//same here
var/number = 1
proc
PDeathCheck()
if (UHP <=0)
world << "Tabu34 dies!"
world << "Tabu34 was killed by [src]"
src.loc = locate(1,1,1)//restarts
src.UHP = src.maxUHP//resets health
InjuredCheck()
if (HP <=15)
icon = 'bugcut.dmi'
else
icon = 'bug.dmi'
LevelUp(mob/M)
if(src.exp >= src.expNeeded)
src <<"You Leveled Up!!"
src.level++
src.maxUHP+=rand(1,10)
src.UHP=src.maxUHP
src.expNeeded *= 1.25
src.exp = 0
src.strength+=1
src.defense+=1
if(src.level==2)
flick("trans",src)
src.icon_state="ssj"
if(src.level==3)
flick("ssj2trans",src)
src.icon_state="ssj2"
if(src.level==4)
flick("ssj3trans",src)
src.icon_state="ssj3"
if(src.level==5)
flick("ssj4trans",src)
src.icon_state="ssj4"
if(src.level==6)
flick("ssj5trans",src)
src.icon_state="ssj5"
if(src.level==7)
flick("ssj6trans",src)
src.icon_state="ssj6"
if(src.level==8)
flick("ssj7trans",src)
src.icon_state="ssj7"
if(src.level==9)
flick("ssj8trans",src)
src.icon_state="ssj8"
if(src.level==10)
flick("ssj9trans",src)
src.icon_state="ssj9"
if(src.level==11)
flick("ssj10trans",src)
src.icon_state="ssj10"
if(src.level==12)
flick("revert",src)
flick("norm-ssjholytrans",src)
src.icon_state="ssjholy"
if(src.level==13)
flick("revert",src)
flick("norm-ssjmopartrans",src)
src.icon_state="ssjmopar"
DeathCheck(mob/M as mob) //checks to see if an attack is deadly
if(HP <= 0) //if the defender's HP is low enough...
world << "[src] dies!" //do the death messaging
world << "[src] was killed by [M]!"
world << "[M] gains [expgained] experience!"
M.exp+= 3 //adds exp points
M.LevelUp()
del(src)
mob
Player
icon = 'person.dmi' //makes it so all mobs will be created with the person icon
var
player = 1
Del()
var/obj/gold/G = new(loc) //create a new obj from the gold blueprint
G.amount = rand(1,100) //set its amount variable randomly
..() //call the parent
verb
attack(mob/Player/G as mob in oview(1)) //attack a mob within 1 tile of you
usr << "You attack [G]!" //send this message to the usr
oview() << "[usr] attacks [G]!" //send this message to everybody else
var/damage = 3*strength //assign a random # to a new variable
usr << "[damage] damage!" //tell the damage to the world
G.HP -= damage //take away the damage from M
G.InjuredCheck() //check for injuries w/ proc
G.DeathCheck(src) //check for death with a proc
say(msg as text) //What the usr says is passed into "msg" as text
world << "[usr]: [msg]" //The world sees chatroom-like output
mob
Saibaman
icon = 'bug.dmi'
var/bstrength = 2
var/gold = 2
var/player = 0
var/monster = 1
var/PK = 1
var/NPC = 0
New()
. = ..()
spawn()
Wander()
proc/Wander(var/mob/Player/P)
while(src)
if(P in oview(5))
step_towards(src,P)
for(P in oview(1))
break
for(P in oview(2))
break
for(P in oview(3))
break
for(P in oview(4))
break
else
step_rand(src)
sleep(5)
for(P in oview(5))
break
sleep(5)
spawn(5)
Wander()
Bump(mob/Player/M)
if(M.player == 1)
Fight(M)
else
return
proc/Fight()
for(var/mob/Player/E in get_step(usr,usr.dir))
var/damage = bstrength
E.UHP -= damage
E << "[src] attacks you for [damage] damage!!"
src<<"You attack [E] for [damage] damage!!"
PDeathCheck(E)
obj
gold //define a "gold" prototype, which is a kind of obj
icon = 'gold.dmi' //set the default icon
var
amount //declare a new variable called "amount"
verb
get() //obj/gold/verb/get()
set src in view(1) //src must be close
usr << "You pick up [amount] gold."
usr.wealth += amount //add to usr.wealth
del(src) //delete the gold
obj
tree
icon = 'tree.dmi'
density = 1
Enter()
return
obj
bug //You can't see spawn points on the map because they have no image. The game maker can when making a map though :P
var/My_Spawned //This is a var that means "The mob that this spawnpoint spawned."
New()
spawn()
SpawnCycle()
proc/SpawnCycle()
if(My_Spawned == null) //If this is not defined...
sleep(100)
var/E = new /mob/Saibaman (src.loc) //Make a new stickman as a variable, so we can edit the newly created stickman after this is defined.
My_Spawned = E //This links M to the spawn point.
E:Spawned_By = src //This is so when a mob dies, the Death() proc can easily find the spawn point that spawned it, and set that spawn point's My_Spawned var to null.
spawn(10)
SpawnCycle()
turf
grass //defines a "grass" prototype, which is a kind of turf...
icon = 'grass.dmi' //and has an icon named 'grass.dmi'. In single quotes!
start
icon = 'start.dmi'
world //we set one of our world's characteristics:
turf = /turf/grass //its default turf is the grass turf.
mob/Stat() //Call the Stat proc that updates the stat window every Tenth of a second...
stat(src)
stat(" HP: ","[UHP]/[maxUHP]" ) //It makes it easier to read if you put a bunch of spaces like that.
stat(" Gold: ","[wealth]")
stat(" Experience: ","[exp]/[expNeeded]")
stat(" Level: ","[level]")
stat(" Strength: ","[strength]")
stat(" Defense: ","[defense]")
statpanel("Credits")
stat("Credits")
stat("Tabu34: Main Everything")
stat("Moparfreak63: Made the person icon")
//END OF CODE

even when i took away the parentheses it didnt help
In response to Tabu34
alright try adding this

world
mob = /mob/human




In response to N1ghtW1ng
alright that solved my icon problem, but now the login part doesnt run. It just goes right into the game.also, my player won't die, event though my death check proc should work fine.
unless it shouldnt...

//This is a test world started by Tabu34 on 3/15/04 and yet to be completed...
mob/create_character
var/mob/character
Login()
var/charactername = input("Hello, Pick a name for your character, something you wish for people to call you in the game.","Character Name?")
character = new/mob/Player
src.client.mob = character
character.name = charactername
character.loc=locate (1,1,1)
world<<"<B>[character] has logged in!"
del(src)
..()
mob
var/level=1
var/exp=0 // experience (total)
var/expNeeded= 15 // experience for the next level
var/maxHP= 20
var/expgained= 3
var/Spawned_By
var/HP = 30 //declares a new variable called HP, with a value of 30
var/wealth = 0 //total money
var/UHP = 40 //new var Hp for user
var/maxHp = 30 //max hp for bug
var/maxUHP = 40 //max hp for user
var/strength = 3//change to the amount you want the player to have
var/defense = 2//same here
var/number = 1
proc
PDeathCheck()
if (UHP <=0)
world << "Tabu34 dies!"
world << "Tabu34 was killed by [src]"
src.loc = locate(1,1,1)//restarts
src.UHP = src.maxUHP//resets health
InjuredCheck()
if (HP <=15)
icon = 'bugcut.dmi'
else
icon = 'bug.dmi'
LevelUp(mob/M)
if(src.exp >= src.expNeeded)
src <<"You Leveled Up!!"
src.level++
src.maxUHP+=rand(1,10)
src.UHP=src.maxUHP
src.expNeeded *= 1.25
src.exp = 0
src.strength+=1
src.defense+=1
if(src.level==2)
flick("trans",src)
src.icon_state="ssj"
if(src.level==3)
flick("ssj2trans",src)
src.icon_state="ssj2"
if(src.level==4)
flick("ssj3trans",src)
src.icon_state="ssj3"
if(src.level==5)
flick("ssj4trans",src)
src.icon_state="ssj4"
if(src.level==6)
flick("ssj5trans",src)
src.icon_state="ssj5"
if(src.level==7)
flick("ssj6trans",src)
src.icon_state="ssj6"
if(src.level==8)
flick("ssj7trans",src)
src.icon_state="ssj7"
if(src.level==9)
flick("ssj8trans",src)
src.icon_state="ssj8"
if(src.level==10)
flick("ssj9trans",src)
src.icon_state="ssj9"
if(src.level==11)
flick("ssj10trans",src)
src.icon_state="ssj10"
if(src.level==12)
flick("revert",src)
flick("norm-ssjholytrans",src)
src.icon_state="ssjholy"
if(src.level==13)
flick("revert",src)
flick("norm-ssjmopartrans",src)
src.icon_state="ssjmopar"
DeathCheck(mob/M as mob) //checks to see if an attack is deadly
if(HP <= 0) //if the defender's HP is low enough...
world << "[src] dies!" //do the death messaging
world << "[src] was killed by [M]!"
world << "[M] gains [expgained] experience!"
M.exp+= 3 //adds exp points
M.LevelUp()
del(src)
mob
Player
icon = 'person.dmi' //makes it so all mobs will be created with the person icon
var
player = 1
Del()
var/obj/gold/G = new(loc) //create a new obj from the gold blueprint
G.amount = rand(1,100) //set its amount variable randomly
..() //call the parent
verb
attack(mob/Saibaman/G as mob in oview(1)) //attack a mob within 1 tile of you
usr << "You attack [G]!" //send this message to the usr
oview() << "[usr] attacks [G]!" //send this message to everybody else
var/damage = 3*strength //assign a random # to a new variable
usr << "[damage] damage!" //tell the damage to the world
G.HP -= damage //take away the damage from M
G.InjuredCheck() //check for injuries w/ proc
G.DeathCheck(src) //check for death with a proc
say(msg as text) //What the usr says is passed into "msg" as text
world << "[usr]: [msg]" //The world sees chatroom-like output
mob
Saibaman
icon = 'bug.dmi'
var/bstrength = 2
var/gold = 2
var/player = 0
var/monster = 1
var/PK = 1
var/NPC = 0
New()
. = ..()
spawn()
Wander()
proc/Wander(var/mob/Player/P)
while(src)
if(P in oview(5))
step_towards(src,P)
for(P in oview(1))
break
for(P in oview(2))
break
for(P in oview(3))
break
for(P in oview(4))
break
else
step_rand(src)
sleep(5)
for(P in oview(5))
break
sleep(5)
spawn(5)
Wander()
Bump(mob/Player/M)
if(M.player == 1)
Fight(M)
else
return
proc/Fight()
for(var/mob/Player/E in get_step(usr,usr.dir))
var/damage = bstrength
E.UHP -= damage
E << "[src] attacks you for [damage] damage!!"
src<<"You attack [E] for [damage] damage!!"
PDeathCheck()
obj
gold //define a "gold" prototype, which is a kind of obj
icon = 'gold.dmi' //set the default icon
var
amount //declare a new variable called "amount"
verb
get() //obj/gold/verb/get()
set src in view(1) //src must be close
usr << "You pick up [amount] gold."
usr.wealth += amount //add to usr.wealth
del(src) //delete the gold
obj
tree
icon = 'tree.dmi'
density = 1
Enter()
return
obj
bug //You can't see spawn points on the map because they have no image. The game maker can when making a map though :P
var/My_Spawned //This is a var that means "The mob that this spawnpoint spawned."
New()
spawn()
SpawnCycle()
proc/SpawnCycle()
if(My_Spawned == null) //If this is not defined...
sleep(100)
var/E = new /mob/Saibaman (src.loc) //Make a new stickman as a variable, so we can edit the newly created stickman after this is defined.
My_Spawned = E //This links M to the spawn point.
E:Spawned_By = src //This is so when a mob dies, the Death() proc can easily find the spawn point that spawned it, and set that spawn point's My_Spawned var to null.
spawn(10)
SpawnCycle()
turf
grass //defines a "grass" prototype, which is a kind of turf...
icon = 'grass.dmi' //and has an icon named 'grass.dmi'. In single quotes!
start
icon = 'start.dmi'
world //we set one of our world's characteristics:
turf = /turf/grass //its default turf is the grass turf.
mob = /mob/Player
mob/Stat() //Call the Stat proc that updates the stat window every Tenth of a second...
stat(src)
stat(" HP: ","[UHP]/[maxUHP]" ) //It makes it easier to read if you put a bunch of spaces like that.
stat(" Gold: ","[wealth]")
stat(" Experience: ","[exp]/[expNeeded]")
stat(" Level: ","[level]")
stat(" Strength: ","[strength]")
stat(" Defense: ","[defense]")
statpanel("Credits")
stat("Credits")
stat("Tabu34: Main Everything")
stat("Moparfreak63: Made the person icon")
//END OF CODE


there is that what u wanted?
In response to Tabu34
edit your post above with ur code in it and put <dm] before the code and </dm] after it jus replace the (]) with (>)
In response to N1ghtW1ng
i did
u should look
=)

[link]
In response to Tabu34
mob/create_character
var/mob/character
Login()
..()
var/charactername = input("Hello, Pick a name for your character, something you wish for people to call you in the game.","Character Name?")
character = new/mob/Player
src.client.mob = character
character.name = charactername
character.loc=locate (1,1,1)
world<<"<B>[character] has logged in!"
del(src)



that i moved the ..()
In response to N1ghtW1ng
that didnt do it...
In response to Tabu34
Tabu34 wrote:
that didnt do it...

There was no reason for posting your battle system, and Deadron's Character Handling. Deadron's Character Handling isn't bugged, I am currently using it in my game right now.

There was also no reason to go along posting the Battle System, because that had nothing to do with it.

Look over your code a bit, and only post what you need help on.

--Dan
In response to SSJ4_Gohan_Majin
he asked and i wasnt sure what he wanted to see so i posted it all.
In response to Tabu34
Tabu34 wrote:
he asked and i wasnt sure what he wanted to see so i posted it all.

Just so I can help, post your problem.

--Dan
In response to SSJ4_Gohan_Majin
ok. When i login to my game, it goes directly to the game, and bypasses the naming screen. And, for some reason, my player wont die. Im also having trouble with the monster blocker from Ham-Warrior400's demo. I get teleported away if i walk through also. So i deleted it.