ID:263485
 
Code:
world
New()
LoadMap()
Del()
SaveMap()


Problem description: this does nothing, i have to manually save and load the map anyways. whats wrong with this? ive also tried having the Load and Save proc in the new so would be New(LoadMap()) but that did nothing too. Any ideas?

You forgot to call the parent.
In response to Pyro_dragons
?
In response to Chase_Hammer
..()

Read the DMGUIDE and you would know this.
In response to A.T.H.K
i have read the darn guide about 2 times now but i didnt see how ..() will help my issue but ok.
In response to Pyro_dragons
Which doesn't really matter in this case.

Anyway, world/New() IS called properly, perhaps there is something wrong in the proc or proc call. world/Del() I dunno, how can it be run if you've closed the program. >-> Try calling the load proc in client/Del() if that client was the last client in the world, as I heard it apparently works.
In response to A.T.H.K
That was very nice of you, ATHK.

world
New()
spawn(1) // It never really got explained to me why it works, but it works...
LoadMap()


O-matic
In response to O-matic
I know that may actually compile, but spawn() isn't sleep(), and needs the statement idented to it.
In response to Kaioken
I've actually tested it -- it works. Although, I'd like an explanation from someone about why it works...

O-matic
In response to O-matic
O-matic wrote:
I've actually tested it -- it works. Although, I'd like an explanation from someone about why it works...

O-matic

It works, but not the way you think. I'm not good at explaining things so I'm just going to say hit F1 and read away! =P
In response to O-matic
O-matic wrote:
That was very nice of you, ATHK.

> world
> New()
> spawn(1) // It never really got explained to me why it works, but it works...
> LoadMap()
>

O-matic

You forgot to call the parent too...
In response to Pyro_dragons
He commented oh how nice i was but forgot what i posted.. tisk tisk tisk
In response to O-matic
O-matic wrote:
That was very nice of you, ATHK.

> world
> New()
> spawn(1) // It never really got explained to me why it works, but it works...
> LoadMap()
>

O-matic

I think having the spawn there delays it just enough to do it. Otherwise the world loads up too fast and just skips it to prevent problems?
In response to Pyro_dragons
Which, again, doesn't matter in world/New() unless you have other overrides of it, since it's default action is...nothing.
In response to Mechanios
Perhaps, but statements have to be idented on spawn(). I guess that compiles, but is really a bug in Dream Maker.
Anyway, New() never, err, runs too fast/soon, it runs fine. If you look it up in the reference, all atoms (from the map) and global vars have been initialized before it. It depends how the LoadMap() proc works; it is probably getting called but not operating as expected (care to post it here?). If you use something like;
world/New()
. = ..() //call other overrides, if any...
sleep() //let other procs procceed first (sleep()'s action with argument null/0)
LoadMap() //now call the proc

Then it may cause it to work, because whatever that LoadMap() requires may of been initialized/set then.