Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (TipmyPip, 1 invisible), 18,699 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: Dynamic Resource folder [Re: jcl] #39128
08/17/06 16:38
08/17/06 16:38
Joined: Jul 2006
Posts: 96
C
ChildeHarold Offline
Junior Member
ChildeHarold  Offline
Junior Member
C

Joined: Jul 2006
Posts: 96
6.40.50.

this is part of my code, checking if such a wrs file exists:

if (NewGame->_fileManager->CheckLoaded("Betapolis.wrs") == true)
{
add_resource ("Betapolis.wrs");
);

this a super simple wdl check

// resource("Betapolis.wrs")

function AddMe()
{

add_resource("Betapolis.wrs");
load("Betapolis.wmb");
}


on_8 = AddMe;


This latter one should add a resouce when a key is hit. It prompts with an error message when I hit the key.
But if I comment out the resource statement aboove and try to load the "betapolis.wmb" (which resides inside the resource) everything works fine.

Last edited by ChildeHarold; 08/17/06 16:41.
Re: Dynamic Resource folder [Re: ChildeHarold] #39129
08/17/06 17:20
08/17/06 17:20
Joined: Sep 2003
Posts: 9,859
F
FBL Offline OP
Senior Expert
FBL  Offline OP
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
Not sure, but maybe a wait(1) is required before accessing the resource..?

Re: Dynamic Resource folder [Re: FBL] #39130
08/17/06 17:35
08/17/06 17:35
Joined: Jul 2006
Posts: 96
C
ChildeHarold Offline
Junior Member
ChildeHarold  Offline
Junior Member
C

Joined: Jul 2006
Posts: 96
thanks for the suggestion, but that did not work either.

Re: Dynamic Resource folder [Re: ChildeHarold] #39131
08/17/06 21:40
08/17/06 21:40
Joined: Aug 2005
Posts: 312
Sweden
tindust Offline
Senior Member
tindust  Offline
Senior Member

Joined: Aug 2005
Posts: 312
Sweden
Just a hunch, but doesn't the resource statements have to go in at the beginning of the wdl, just before global variables and function declarations begin?

cheers


Lighten Your Load With

DynaLights 1.0

Realtime 3D Lighting. Free Trial Version available.

3DGS 660P
Re: Dynamic Resource folder [Re: tindust] #39132
08/18/06 06:24
08/18/06 06:24
Joined: Jul 2006
Posts: 96
C
ChildeHarold Offline
Junior Member
ChildeHarold  Offline
Junior Member
C

Joined: Jul 2006
Posts: 96
in case of dynamic resource assignment you would not care about that, you would just initiate a resource through this

add_resource

functuion I am fighting with.

Last edited by ChildeHarold; 08/18/06 06:25.
Re: Dynamic Resource folder [Re: ChildeHarold] #39133
08/18/06 08:46
08/18/06 08:46
Joined: Jul 2000
Posts: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
Frankfurt
Yes, the WDL code you've posted should work (I assume that the 'load' was a typo and meant 'level_load'). At least when I quickly try here a similar code, it works.

I'll look further into this. I'll be away next week, but will take care of this issue after my return. If I can not reproduce the problem, I might need your sample - maybe something in the resource prevent the level_load from functioning.

Re: Dynamic Resource folder [Re: jcl] #39134
08/18/06 09:18
08/18/06 09:18
Joined: Aug 2005
Posts: 312
Sweden
tindust Offline
Senior Member
tindust  Offline
Senior Member

Joined: Aug 2005
Posts: 312
Sweden
What about the typo:

Quote:

this is part of my code, checking if such a wrs file exists:

if (NewGame->_fileManager->CheckLoaded("Betapolis.wrs") == true)
{
add_resource ("Betapolis.wrs");
);





should be:

Code:
this is part of my code, checking if such a wrs file exists:
if (NewGame->_fileManager->CheckLoaded("Betapolis.wrs") == true)
{
add_resource ("Betapolis.wrs");
}



maybe this is it ...?


Lighten Your Load With

DynaLights 1.0

Realtime 3D Lighting. Free Trial Version available.

3DGS 660P
Re: Dynamic Resource folder [Re: tindust] #39135
08/18/06 11:01
08/18/06 11:01
Joined: Jan 2002
Posts: 692
berlin
MB Offline
User
MB  Offline
User

Joined: Jan 2002
Posts: 692
berlin
thanks Tindust, for caring - but the function was ok, just a typo.

@jcl - yes, that would be nice if you'll have a look on that.
I can send you the resource (in fact I had the same idea you had - and tested various ones).
Maybe experimanting with that may help.
Desperately as I was I began to write my own packer format...

Re: Dynamic Resource folder [Re: MB] #39136
08/28/06 09:05
08/28/06 09:05
Joined: Jul 2000
Posts: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
Frankfurt
I found the problem. There was indeed a bug in add_resource. This will be fixed in the 6.50 update.

Page 2 of 2 1 2

Moderated by  aztec, Spirit 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1