ID:149248
 
Ok I have my game set up to where they get skills during the game and when they get enough it adds an object to their hud, so i put it to save their hud when they log out so when they come back they still have all the skills they had. It gives no error at compile time but when i run it and continue a game gives me this.



runtime error: Cannot read null.screen
proc name: New (/obj/Say/New)
source file: main.dm,959
usr: null
src: Say (/obj/Say)
call stack:
Say (/obj/Say): New(null)
Netshark010101 (/mob/characters/sk8er): Read(players/n/netshark010101.sav (/savefile))
Netshark010101 (/client): base LoadMob("Netshark010101")
ChoosingCharacter (/mob/BaseCamp/ChoosingCharacter): ChooseCharacter()
ChoosingCharacter (/mob/BaseCamp/ChoosingCharacter): Login()



for every hud object that i initialize at the very beginning it gives it to me twice, and the old hud is still up there though so the saving of it works. I have tried so many ways to approach this, but everything i try it seems to give me cannot read null.screen
You're seeing "cannot read null.screen" because your code is apparently trying to add the objects to client.screen when there's no client. Without seeing your save/load code, we can't help you.

Lummox JR
In response to Lummox JR
i am using Deadron's Character Handling, and the part that i added to it was

Write(savefile/F)
..()
if (world.maxx)
F["last_x"] << x
F["last_y"] << y
F["last_z"] << z
F["Screen"] = client.screen//this

Read(savefile/F)
..()
if (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
client.screen = F["Screen"] //and this


but the saving and loading works fine, it is just that the program tries to put the original hud back on but it reads it as null.
In response to Netshark010101
I don't think the = syntax you're using with the save actually works. However, you also have to show us where Read() is being called, because if the mob has no client assigned to it yet, there's your problem.

Lummox JR