ID:146622
 
Code:
world/New()
..()
world.OpenPort(3000)
Load()

mob/verb/Save()
set name = "Save Settings"
set category= "Server Checking"
Save()

proc
Load()
if(fexists("Monitor.sav"))
var/savefile/F = new ("Monitor.sav")
F >> address
F >> port
F >> resources

Save()
var/savefile/F = new("Monitor.sav")
world<<"Saved"
F << address
F << port
F << resources


Problem description: Now when i press save nothing happens and my dream seeker closes. I go to trace.txt and see nothing. Is there a runtime error that I can see so I may fix this or does someone knows whats wrong?

~>Jiskuha


Anyone?

~>Jiskuha
Jiskuha wrote:
Code:
> world/New()
> ..()
> world.OpenPort(3000)
> Load()
>
> mob/verb/Save()
> set name = "Save Settings"
> set category= "Server Checking"
> Save()
>
> proc
> Load()
> if(fexists("Monitor.sav"))
> var/savefile/F = new ("Monitor.sav")
> F >> address
> F >> port
> F >> resources
>
> Save()
> var/savefile/F = new("Monitor.sav")
> world<<"Saved"
> F << address
> F << port
> F << resources
>
>
>

Problem description: Now when i press save nothing happens and my dream seeker closes. I go to trace.txt and see nothing. Is there a runtime error that I can see so I may fix this or does someone knows whats wrong?

~>Jiskuha



Hmmm sorry Jiskuha Im not sure whats going on here but Ill try and help. Umm first is your Saved message poping up? and could you make it world << "Saved". I dont know why I guess I am just picky with code. Umm also could you do a del(F) after getting and setting .sav information.

Umm I am stumped. Its times like this that I would love BYOND to have a step debugging set up.
I'd say it's not working properly because you automatically set the port to 3000 at startup. Another reason may be that you do nothing with the variables when they are loaded.

Think of the savefile as almost a list that will store whatever you put into it. F["address"] would be where address would be saved for example.

world/New()
..()
world.OpenPort(3000)
Load()

mob/verb/Save()
set name = "Save Settings"
set category= "Server Checking"
Save()

proc
Load()
if(fexists("Monitor.sav"))
var/savefile/F = new ("Monitor.sav")
F["address"] >> address
F["port"] >> port
F["resources"] >> resources

Save()
var/savefile/F = new("Monitor.sav")
world<<"Saved"
F["address"] << address
F["port"] << port
F["resources"] << resources


If save still causes DreamSeeker to close then it's something else, though that should work.