runtime error: bad client
proc name: loadslot1 (/mob/verb/loadslot1)
source file: Login.dm,231
usr: Kboy33 (/mob)
src: Hyuuga, Rein (/mob)
call stack:
Hyuuga, Rein (/mob): loadslot1()
I keep on receiving this error whenever I load my character. I've been through my code multiple times to see what I messed up, however I can't solve this issue. I also read the two guides to run time errors provided on a previous thread, however I had no luck tackling this issue. The codes which I believe to be relevant are as follows:
Loadslot:
loadslot1()
set hidden = 1
if(fexists("Clients/[src.key]/1.sav"))
switch(alert("Load slot number 1?","Loading","Yes","No"))
if("No") return
var/savefile/f = new("Clients/[src.key]/1.sav")//568
winset(src,"chatwindow","is-visible=true")
winset(src,"chatwindow","X=0")
winset(src,"chatwindow","Y=568")
winset(src,"loadchar","is-visible=false")
winset(src,"delchar","is-visible=false")
f["mob"] >> src
f["Name"] >> src.Name
f["name"] >> src.name
f["Clan"] >> src.Clan
f["village"] >> src.village
GetScreenResolution(src)
f["x"] >> x
f["y"] >> y
f["z"] >> z
f["Jutsus"] >> src.Jutsus
f["JutsuIcons"] >> src.JutsuIcons
winset(src,"login","is-visible=false")
src<<"Loaded you, [name]."
src<<"<font size=2><font color=red><b>Don't forget to visit/fan our <a href=http://www.byond.com/games/Kboy33/JutsuInfinity>HUB</a></b>!"
world<<"<font color=yellow>[src.name] logged in."
src.Name(src.Name)
src.UpdateBars()
src.loc=locate(x,y,z)
ingame=1
if(src.rank=="Kage")
src.verbs+=typesof(/mob/Kage/verb)
Save and Load:
mob
proc
Save()
var/savefile/F = new ("Clients/[src.key]/[src.saveslot].sav")
src.Write(F) // writes your variables/lists onto it
F["mob"] << src
F["Name"] << src.Name
F["name"] << src.name
F["Jutsus"] << src.Jutsus
F["JutsuIcons"] << src.JutsuIcons
F["Clan"] << src.Clan
F["village"] << src.village
F["x"] << x
F["y"] << y
F["z"] << z
src<<"Saved!"
Load()
if(fexists("Clients/[src.key]/3.sav"))//if an existing save file exists in the folder located in the game folder
var/savefile/F=new("Clients/[src.key]/[src.saveslot].sav") // it creates a new save file
src.Read(F) //it reads it
var/newX
var/newY
var/newZ
var/Jutsus
var/Jutsuicons
var/name
var/Clan
var/village
F["lastx"] >> newX//it takes the lastx variable in the save and puts it into the newx variable
F["lasty"] >> newY//same as above with a new variable
F["lastz"] >> newZ//same as above with a new variable
F["Jutsus"] >> Jutsus
F["JutsuIcons"] >> Jutsuicons
F["Name"] >> name
F["Clan"] >> Clan
F["village"] >> village
src.loc=locate(newX,newY,newZ)//makes the player located in those locations
ingame=1
src<<"Loaded!"
Line 231 is: winset(src,"login","is-visible=false")
f["mob"] >> src
creates a new mob and assigns it to src before reading it. Try removing this line and see if that works; If you do, however, I'd remove
f["mob"] << src
as well.