Gamestudio Links
Zorro Links
Newest Posts
WFO Training with parallel cores Zorro64
by Martin_HH. 02/24/26 19:51
Zorro version 3.0 prerelease!
by TipmyPip. 02/24/26 17:09
ZorroGPT
by TipmyPip. 02/23/26 21:52
Camera always moves upwards?
by clonman. 02/21/26 09:29
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
5 registered members (Martin_HH, TipmyPip, AndrewAMD, Grant, USER0328), 5,287 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
alx, ApprenticeInMuc, PatrickH90, USER0328, Sfrdragon
19199 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Sporadically Error E1301: Can't open file #227121
09/12/08 18:19
09/12/08 18:19
Joined: Feb 2006
Posts: 1,011
Germany
pegamode Offline OP
Serious User
pegamode  Offline OP
Serious User

Joined: Feb 2006
Posts: 1,011
Germany
Hi everybody,

my current project is a point&click adventure.

My problem is that sporadically I get an "Error E1301: Can't open file" when changing the room (loading new level).

It's not everytime and when the error occurs it's everytime another model that can't be loaded. When changing several times between two rooms, sometimes everything works fine and sometimes I get the error. It's about 50% / 50% ...

After loading the level I wait 2 frames ... do I need some frames more ?!?

Any ideas ?!?

Regards,
Pegamode.

Re: Sporadically Error E1301: Can't open file [Re: pegamode] #227202
09/13/08 07:28
09/13/08 07:28
Joined: Dec 2002
Posts: 616
Austria
Stromausfall Offline
User
Stromausfall  Offline
User

Joined: Dec 2002
Posts: 616
Austria
Without posting the whole code here, it's hard to tell where there's the error, it would be better if you copy your project(for safety) and then remove all code that's unrelated to the problem, until your code is that small with the problem, to post it or to find the error yourself....

I myself had sometimes errors i wasn't able to find a solution for, so i tried to make a small project with minimized code but still with the error to upload to the forum and often i was able to find the problem because of this!

cheers


get the C# wrapper:
for A7.85.4 and A8.30.4, Version 2.3.9
at http://acknexwrapper2.matthias-auer.net/ or visit the thread
Re: Sporadically Error E1301: Can't open file [Re: Stromausfall] #227203
09/13/08 07:55
09/13/08 07:55
Joined: Feb 2006
Posts: 1,011
Germany
pegamode Offline OP
Serious User
pegamode  Offline OP
Serious User

Joined: Feb 2006
Posts: 1,011
Germany
Hmm ... as it is such a lot of code it's impossible to post it here.

I hoped that somebody had the same error, too, and found a solution.

If it is not a problem of the level_load command itself it might be a problem with a function still running in background ... but "Can't open file" would be strange in that manner.

Re: Sporadically Error E1301: Can't open file [Re: pegamode] #227211
09/13/08 09:08
09/13/08 09:08
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
If you can isolate the function/s that the error occurs in,
try adding the following line/s defore the ent_create (or whatever loads the file)
Code:
...
diag("\n");
diag{"Any text you want to identify which function this code is in\n");
diag(entity model file name or string containing it);  //eg diag(ModName);
diag("\n");
...
then open the "acklog.txt" file in your *.c folder and look at the last few lines.
It may be the entity names are being mangled by the game_load function.
If so, we can look into it from there.

Also, if you have isolated which functions the failure is happening in,
try posting a hunk of code from just that function, if you cant do the whole function...


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Sporadically Error E1301: Can't open file [Re: EvilSOB] #227213
09/13/08 09:41
09/13/08 09:41
Joined: Feb 2006
Posts: 1,011
Germany
pegamode Offline OP
Serious User
pegamode  Offline OP
Serious User

Joined: Feb 2006
Posts: 1,011
Germany
The problem is that the models that sometimes can't be loaded are set in WED.
So the error is thrown by the level_load command.

When trying it last time I could change between my two rooms about 20 times without any error, but on the 21st try the error occured.

After changing again everything was alright again ... but a few changes later another model couldn't be loaded.

Re: Sporadically Error E1301: Can't open file [Re: pegamode] #227344
09/13/08 21:31
09/13/08 21:31
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Hmmmm.
Educated guess, but try setting freeze_mode before loading
Code:
freeze_mode=2;
level_load(blah blah);
wait(2);
freeze_mode=0;
and/or put a wait(1); before the level_load.

Can you post the code relating to the level_load? Just the function its in.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Sporadically Error E1301: Can't open file [Re: EvilSOB] #227397
09/14/08 08:53
09/14/08 08:53
Joined: Feb 2006
Posts: 1,011
Germany
pegamode Offline OP
Serious User
pegamode  Offline OP
Serious User

Joined: Feb 2006
Posts: 1,011
Germany
Thanks for the hint with freeze mode. I'll try that.

Here's the code that's currently in use:

function load_new_room (STRING* lName,STRING* entPosName) {
my = NULL; // make this action a global function
levelLoaded = 0;
scan_active = 0;
wait(2); // wait for some actions to stop
mouse_mode = 0;
set_commandLine_invisible();
if (entPosName != NULL) { // only change room if player walked through door, but not when changing player
if (current_player == c_player1.entity) {
c_player1.isInRoom = lName;
} else if (current_player == c_player2.entity) {
c_player2.isInRoom = lName;
} else if (current_player == c_player3.entity) {
c_player3.isInRoom = lName;
}
}
max_cams = 0;
level_wmb = lName;
level_load(lName);
wait(2);
place_inroom_characters();
me = ent_for_name (current_player_name);
player = me;
current_player = me;

if (entPosName != NULL) {
you = ent_for_name (entPosName);
}
if (me != NULL) {
if (current_player == c_player1.entity) {
inventory = (Bag*)getFromGSHashmap(_chr("inventory1"));
if (you != NULL) {
vec_set(c_player1->entity.x,you.x);
c_player1->entity.pan = you.pan;
}
if(c_player2.isInCurrentRoom == 1) {
set(c_player2.entity,PASSABLE);
}
if(c_player3.isInCurrentRoom == 1) {
set(c_player3.entity,PASSABLE);
}
} else if (current_player == c_player2.entity) {
inventory = (Bag*)getFromGSHashmap(_chr("inventory2"));
if(you != NULL) {
vec_set(c_player2->entity.x,you.x);
c_player2->entity.pan = you.pan;
}
if(c_player1.isInCurrentRoom == 1) {
set(c_player1.entity,PASSABLE);
}
if(c_player3.isInCurrentRoom == 1) {
set(c_player3.entity,PASSABLE);
}
} else if (current_player == c_player3.entity) {
inventory = (Bag*)getFromGSHashmap(_chr("inventory3"));
if(you != NULL) {
vec_set(c_player3->entity.x,you.x);
c_player3->entity.pan = you.pan;
}
if(c_player1.isInCurrentRoom == 1) {
set(c_player1.entity,PASSABLE);
}
if(c_player2.isInCurrentRoom == 1) {
set(c_player2.entity,PASSABLE);
}
}
}
init_cameras();
levelLoaded = 1;
automatic_cam_selector();
update_room_cam();
scan_active = 1;
mouse_mode = 2;
set_commandLine_visible();
object_scanner();
}

Re: Sporadically Error E1301: Can't open file [Re: pegamode] #227573
09/15/08 06:43
09/15/08 06:43
Joined: Feb 2006
Posts: 1,011
Germany
pegamode Offline OP
Serious User
pegamode  Offline OP
Serious User

Joined: Feb 2006
Posts: 1,011
Germany
If I add freeze_mode to my function as it is, the freeze stops also the current function so that freeze_mode = 0 is never reached.

Re: Sporadically Error E1301: Can't open file [Re: pegamode] #227634
09/15/08 13:42
09/15/08 13:42
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
I havent had a chance to look at your code or test yet, but try putting
the wait(2); after the freeze_mode=0; and see if that helps


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Sporadically Error E1301: Can't open file [Re: EvilSOB] #227654
09/15/08 15:29
09/15/08 15:29
Joined: Feb 2006
Posts: 1,011
Germany
pegamode Offline OP
Serious User
pegamode  Offline OP
Serious User

Joined: Feb 2006
Posts: 1,011
Germany
Hi EvilSOB,

I tried your suggestion and now there's no problem with the freeze_mode anymore, but I still get the same error 1301.

Page 1 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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