ID:175709
Mar 18 2003, 10:22 am
|
|
my save file's fine, but when i click new character...it doesn't do anything else...it doesn't ask for your name and who u wanna be...it used to do that...
|
Mar 18 2003, 4:31 pm
|
|
Please post your createcharacter code so we can see what is wrong.
|
In response to Jnco904
|
|
ok i will...
#include <deadron/characterhandling> client script = "<STYLE>BODY {background: black; color: red}</STYLE>" //This changes the chat room box and text colour base_num_characters_allowed = 7 //This limits a players save files #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" world mob = /mob/creating_character //This sets the default mob path view = 6 //This sets the default view of the mob/player name = "InuYasha" //This sets the games name turf = /turf/floor //This sets the default turf turf Terrain //Here we have defined a turf called "grass" icon = 'Terrain.dmi' //Here we put the icon file for the "grass" mob/creating_character Login() ..() world << "[usr] has just entered '[world.name]'!"//We tell the world that someone has just joined the game now src.CreateCharacter() //This tells the src to lookup "CreateCharacter" proc/CreateCharacter() Start //We use this just in case the character makes a null name and if so we get brought back here. var/mob/new_mob //We are declaring a new variable called "new_mob" which will be used in alittle minute var/char_name = input("Please put your character name in here.","Name") as null|text //The player makes their name here if(char_name == null) //Here we tell the game to make the player rename his/her character if they did not pick a name goto Start //This makes us go back to the "Start" if the characters name is null var/char = input(src,"Pick your character!") in list("Half-Demon","Human","Monk") //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" if("Human") new_mob = new /mob/player/Human/Kagome //Looking up the path "/mob/player/monkey" if("None") //This checks whether or not there is a gender chosen, if no gender is chosen the character gets logged out of the game. src.Logout() //This is what logs out the player from the game is no gender is chosen. new_mob.name = char_name //Here is where we assign the player chosen name to the mob. usr.loc = locate(1,1,1) //Here me make the new player start off at the location of X:1, Y:1, Z:1. src.client.mob = new_mob //Here we tell the game that there is a new mob/player in the game ..() /*The characters are defined below*/ mob/player //Here we make a special mob classed as a "player" HalfDemon //Here we make a human species InuYasha //Lets name the first human "guy" icon = 'InuYashaVer1.dmi' //This is the humans icon file that will have the humans icon in. // icon_state = "male" //This is what the humans icon is named in the icon file that was stated above. If there is only one icon in the icon file you don't really need to use the "icon_state" fuction. Human //Here we make a monkey species Kagome //We name this monkey "Monks" icon = 'Kagome.dmi'//monkeys icon file // icon_state = "monks" //Monkeys icon client/Del() //When a player logs out this is called world << "[src] has just shut \himself down from this world..." //This message is sent to the world when the player leaves the game ..() //This deletes the players icon when he/she leaves the game mob/Logout() //This is called because another mob is created (made from the players Key) del(src) //This deletes the players "Key made mob" mob/proc/Save_Character() //Ok, now back to the saving stuff. The type of savefiles we are using are unique because they are client-side savefiles, meaning you can login to someone elses server and still have your character. var/savefile/F = new() //This makes a new savefile. The variable F now means the savefile... Write(F) //The Write proc, like the Read proc will do savefile saving for you. This however, unlike Read(), will save the players mob that he/she has into the savefile specified. client.Export(F) //This will put that savefile into your \BYOND\users\[Your name here]\Keyinfo\ folder. src << "[src.name] saved." //Tell the src that it has been saved. mob/PC/verb/Save() //We gotta let the player do it manually, right? set category = "Communication" src.Save_Character() //Save the character with the proc we defined above. |
In response to YamiGotenks
|
|
in the compilation of this code, i get uber amount of errors
|