ID:179484
 
My mob loading code(thx to Deadron):

client
base_LoadMob(char_name)
var/mob/the_mob = ..()
if (the_mob)
the_mob.Move(locate(/area/start1))


The mob loads perfectly, but I get these weird errors. Some of these come from Deadron's characterhandling lib and I don't really understand what wrong.

runtime error: Cannot execute null.base CharacterNames().
proc name: ChooseCharacter (/mob/BaseCamp/ChoosingCharacter/proc/ChooseCharacter)
usr: ChoosingCharacter (/mob/BaseCamp/ChoosingCharacter)
src: ChoosingCharacter (/mob/BaseCamp/ChoosingCharacter)
call stack:
ChoosingCharacter (/mob/BaseCamp/ChoosingCharacter): ChooseCharacter()
ChoosingCharacter (/mob/BaseCamp/ChoosingCharacter): ChooseCharacter()
ChoosingCharacter (/mob/BaseCamp/ChoosingCharacter): Login()
Connection closed.

Thx.

Cravens wrote:
The mob loads perfectly, but I get these weird errors. Some of these come from Deadron's characterhandling lib and I don't really understand what wrong.

I can look at this tonight. One thing that would help a lot is if you turn this on and run it:

#define DEBUG


Then the errors will have line numbers, which would help me debug the problem.
In response to Deadron
I can look at this tonight. One thing that would help a lot is if you turn this on and run it:

#define DEBUG

Then the errors will have line numbers, which would help me debug the problem.

Ok, I tried loading a new mob and the same errors keeps
appearing.
Anyway, here they are again (with the DEBUG mode):

runtime error: Cannot execute null.base CharacterNames().
proc name: ChooseCharacter (/mob/BaseCamp/ChoosingCharacter/proc/ChooseCharacter)
source file: implementation.dm,103
usr: ChoosingCharacter (/mob/BaseCamp/ChoosingCharacter)
src: ChoosingCharacter (/mob/BaseCamp/ChoosingCharacter)
call stack:
ChoosingCharacter (/mob/BaseCamp/ChoosingCharacter): ChooseCharacter()
ChoosingCharacter (/mob/BaseCamp/ChoosingCharacter): ChooseCharacter()
ChoosingCharacter (/mob/BaseCamp/ChoosingCharacter): Login()
In response to Cravens
It's been a couple of days and I haven't fixed my problem yet (I've been working on some other things).
Will you update your CharacterHandling lib soon ?
If not, could you tell me what's missing in my loading
code ? (see first post for it.)

Thx.
(Sorry for bumping, don't see why I should post this
a second time.)
In response to Cravens
Cravens wrote:
It's been a couple of days and I haven't fixed my problem yet (I've been working on some other things).
Will you update your CharacterHandling lib soon ?
If not, could you tell me what's missing in my loading
code ? (see first post for it.)

Thx.
(Sorry for bumping, don't see why I should post this
a second time.)

I should get to this shortly. Sorry for the delay.
In response to Deadron
hey Deadron, do you think it is possible to save all the users' saves into one save file?

I`m trying to make the hubfiles work like a save server so that all servers have the same saves

I hope i can figure it out.
In response to Pillsverry
I believe savefiles encode keys into them (but I'm not too sure)

So maybe saving like this will work:

mob
proc
save()
var/savefile/F = new("players.sav")
//Code all tmp vars etc.. here.
Write(F)

mob
proc
load()
var/savefile/F = new("players.sav")
Read(F)

mob/Logout()
src.save()
del(src)
mob/Login()
src.load()
..()


I don't know if the savefile complex can load all players seperate vars from one savefile, but it's worth a try.
In response to Pillsverry
Pillsverry wrote:
hey Deadron, do you think it is possible to save all the users' saves into one save file?

I`m trying to make the hubfiles work like a save server so that all servers have the same saves

I hope i can figure it out.

You can do it, but to do it yourself, you'll need to override several of the procs, including the base_SaveMob() and base_LoadMob() procs, and the character names proc.

I can add an option for one savefile in the near future.