ID:142705
 
Code:
client
proc
Load()
var/savefile/load
load = new ("Save Files/[src.mob.ckey]")
load["mob"] >> src.mob
load["x"] >> src.mob.x
load["y"] >> src.mob.y
load["z"] >> src.mob.z

Save()
var/savefile/save
save = new ("Save Files/[src.mob.ckey]")
save["mob"] << src.mob
save["x"] << src.mob.x
save["y"] << src.mob.y
save["z"] << src.mob.z


Problem description:
When I load in to my game all I see is a Black screen and it will not load, how do I fix it? Ppl help me!

you need turfs and mobs and stuff like that
In response to Jino kid
I have it
In response to Nyckz
and have you coded it so it can show on the screen?
        Load()
var/savefile/load
load = new ("Save Files/[src.mob.ckey]")
load["mob"] >> src.mob
mob.loc = locate(load["x"],load["y"],load["z"])
// setting x, y, and z manually will cause problems (like not moving you to the correct place)

Save()
var/savefile/save
save = new ("Save Files/[src.mob.ckey]")
save["mob"] << src.mob
save["x"] << src.mob.x
save["y"] << src.mob.y
save["z"] << src.mob.z
In response to Keeth
DbGT.dm:21:error:loc:undefined var

Dbz Ultimate Heroes.dmb - 1 error, 0 warnings (double-click on an error to jump to it)


In response to Nyckz
You need to set the mob's loc, so... mob.loc instead of loc.
In response to Keeth
How is the code going to look?
In response to Nyckz
It's going to look like setting mob.loc instead of loc
Read my original post.
In response to Keeth
mob.loc = locate(load["x"],load["y"],load["z"])

So this is the way it would look?
Hmm
client/proc/LoadMob()
var/first_initial = copytext(src.key, 1, 2)
if(fexists("players/[first_initial]/[src.key].sav"))
var/savefile/F = new("players/[first_initial]/[src.key].sav") //open it as a savefile
var/thing
F["mob"]>>src.mob



mob
Write(savefile/F)
..()

F["last_x"] << x
F["last_y"] << y
F["last_z"] << z

Read(savefile/F)
..()

var/last_x
var/last_y
var/last_z
F["last_x"] >> last_x
F["last_y"] >> last_y
F["last_z"] >> last_z
loc = locate(last_x, last_y, last_z)

client/proc/SaveMob()
var/first_initial = copytext(src.key, 1, 2)
var/savefile/F = new("players/[first_initial]/[src.key].sav")
F["mob"]<<src.mob
F["name"] << src.mob.name

client
Del()
..()
SaveMob()
sleep(10)
del(mob)
return..()


try that o.o and tell me if it works
In response to Satsuna_no_Hikari
Naw
It don't work
Nyckz wrote:
Code:
client
> proc
> Load()
> var/savefile/load
> load = new ("Save Files/[src.mob.ckey]")
> load["mob"] >> src.mob
> load["x"] >> src.mob.x
> load["y"] >> src.mob.y
> load["z"] >> src.mob.z
>
> Save()
> var/savefile/save
> save = new ("Save Files/[src.mob.ckey]")
> save["mob"] << src.mob
> save["x"] << src.mob.x
> save["y"] << src.mob.y
> save["z"] << src.mob.z
>

Problem description:
When I load in to my game all I see is a Black screen and it will not load, how do I fix it? Ppl help me!

client
proc
Load()
if(fexist("Save Files/[src.mob.ckey]"))
var/savefile/load = new ("Save Files/[src.mob.ckey]")
var/last_x
var/last_y
var/last_z
load["mob"] >> src.mob
load["x"] >> last_x
load["y"] >> last_y
load["z"] >> last_z
src.mob.loc = locate(last_x,last_y,last_z) // saved spawn point
else
src.mob.loc = locate(1,1,1) // default spawn point

Save()
var/savefile/save = new ("Save Files/[src.mob.ckey]")
save["mob"] << src.mob
save["x"] << src.mob.x
save["y"] << src.mob.y
save["z"] << src.mob.z