|
1 registered members (TipmyPip),
18,466
guests, and 6
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Dynamic Resource folder
[Re: jcl]
#39128
08/17/06 16:38
08/17/06 16:38
|
Joined: Jul 2006
Posts: 96
ChildeHarold
Junior Member
|
Junior Member
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]
#39131
08/17/06 21:40
08/17/06 21:40
|
Joined: Aug 2005
Posts: 312 Sweden
tindust
Senior Member
|
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
ChildeHarold
Junior Member
|
Junior Member
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: jcl]
#39134
08/18/06 09:18
08/18/06 09:18
|
Joined: Aug 2005
Posts: 312 Sweden
tindust
Senior Member
|
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
|
|
|
|
|
|