|
|
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
Expert
|
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) ...
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: pegamode]
#227344
09/13/08 21:31
09/13/08 21:31
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
Hmmmm. Educated guess, but try setting freeze_mode before loading 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
OP
Serious User
|
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]
#227634
09/15/08 13:42
09/15/08 13:42
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
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
|
|
|
|