So anyways.
My code currently is (anything related to the problem(i think))
Code: Changing proc
//This is ran after the verb is clicked and creates grids for hair styles etc. and this is an offspring off the "decent game design by Lummox"
CreationChangeProc() //execute on click of new character button to move the clients windows to the creation screen.
client/proc
winset(usr, null, {"
window_default.child_left.left = "main_creation";
window_default.can-resize = "false";
window_default.statusbar = "true";
window_default.titlebar = "true";
window_default.macro = "null";
window_default.menu = "null";
"})
src.verbs -= typesof(/Start/GameStart/verb)
src.verbs += typesof(/Start/GameCreate/verb)
usr.BuildHairGrid()
usr.BuildSkinGrid()
usr.BuildHairColourGrid()
usr.BuildEyeGrid()
//usr.Preview() //currently does not output to grid for w.e reason (worked before implementing the mob/player etc
Code: The trouble maker i think
Start/GameStart
verb
NewCharacter() //execute for new char
var/mob/newchar
switch(alert("Please choose slot to play in","Character Creation","Slot One","Cancel","Slot Two"))
if("Slot One")
newchar = new/mob/human/player(locate(3,3,2)) //Tried not having this but i cant get the "slots" to save unless i use it -shrug-
newchar.slot = 1
newchar.created = 0
usr.client.CreationChangeProc() //This is giving me the problems
usr.client.mob = newchar //alongside this...
if("Slot Two")
newchar = new/mob/human/player(locate(3,3,2))
newchar.slot = 2
usr.client.CreationChangeProc()
usr.client.mob = newchar
if("Cancel")
return
Problem description: the code above works fine atleast i think it does, i could be easily proven wrong. The problem is that if i switch the command that transfers the values with the one that swaps the screen i get
runtime error: Cannot execute null.CreationChangeProc().
proc name: NewCharacter (/Start/GameStart/verb/NewCharacter)
source file: A. Login.dm,68
usr: Midgetbuster (/mob/logincharacter)
src: Midgetbuster (/client)
call stack:
Midgetbuster (/client): NewCharacter()
And i think if i can get it to work the way i want it to ill be able to launch another grid builder (noted by the //preview in changer proc) which is currently failing to build unless ran separately.