1 registered members (TipmyPip),
18,528
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Error E1516
#68137
03/25/06 03:23
03/25/06 03:23
|
Joined: Apr 2004
Posts: 516 USA
Trooper119
OP
User
|
OP
User
Joined: Apr 2004
Posts: 516
USA
|
Can someone shed some light on this error it says Quote:
Problem when loading (stat.SAV)
with Error E1516 on the error title menu, this happens when I call a function that does a simple function no loading or taking out anything of any kind. Thanks
A clever person solves a problem. A wise person avoids it. --Einstein
Currently Codeing: Free Lite-C
|
|
|
Re: Error E1516
[Re: TWO]
#68140
03/25/06 14:37
03/25/06 14:37
|
Joined: Apr 2004
Posts: 516 USA
Trooper119
OP
User
|
OP
User
Joined: Apr 2004
Posts: 516
USA
|
Problem with your theory, my game doesn't work with saved games in any form whatsoever, here is the code, I don't see the problem though, I mean I have no idea what is going on, it should work (in theory) Code:
function pull_pillar { var fire_counter = 0; msg_show("Hold down the fire button for a second", 3); wait(2); while (mouse_left == on && fire_counter < 70) { fire_counter += 1; wait(1); } return(fire_counter); } function pillar_event { ... holddown_button = pull_pillar(); ... }
A clever person solves a problem. A wise person avoids it. --Einstein
Currently Codeing: Free Lite-C
|
|
|
Re: Error E1516
[Re: Trooper119]
#68141
03/25/06 16:29
03/25/06 16:29
|
Joined: Jul 2002
Posts: 4,436 Germany, Luebeck
Xarthor
Expert
|
Expert
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
|
Could you please also post your main function? Wanna see whats going on there. Ah and by the way: Please either choose "Starting with GameStudio" OR "Scripting" for posting the problems you encounter. But not in both, this just get messed up for all.  For you, caus you have to always say most of the things twice. And for those who read both "Starting.." and "Scripting", like me. 
|
|
|
Re: Error E1516
[Re: Xarthor]
#68142
03/25/06 17:21
03/25/06 17:21
|
Joined: Apr 2004
Posts: 516 USA
Trooper119
OP
User
|
OP
User
Joined: Apr 2004
Posts: 516
USA
|
If I stop pulling pull_pillar it stops so this is the problem, I have a lot of code so what do you want me to give you? My main startup code I guess I can give you, and sorry I won't post in both anymore. Code:
function main1() { // set some common flags and variables // warn_level = 2; // announce bad texture sizes and bad wdl code tex_share = on; // map entities share their textures
// center the splash screen for non-640x480 resolutions, and display it splashscreen.pos_x = (screen_size.x - bmap_width(splashmap))/2; splashscreen.pos_y = (screen_size.y - bmap_height(splashmap))/2; splashscreen.visible = on; // wait 3 frames (for triple buffering) until it is flipped to the foreground wait(1);
// now load the level level_load(level_str); // freeze the game freeze_mode = 1;
// wait the required second, then switch the splashscreen off. sleep(1); splashscreen.visible = off; bmap_purge(splashmap); // remove splashscreen from video memory
// load some global variables, like sound volume load_status();
// display the initial message msg_show(mission_str,10);
// initialize lens flares when edition supports flares ifdef CAPS_FLARE; lensflare_start(); endif;
// use the new 3rd person camera move_view_cap = 1;
// un-freeze the game freeze_mode = 0;
// client_move(); // for a possible multiplayer game // call further functions here...
random_tunes() this is part of the startup don't critize the mess its mostly origional default code and I'm still new at this, I gave this because it does load things, another is when I load a pre-game level to do stuff before it enters the game, a little modified but most is dirrectly from AUM Code:
string senior_product_wmb = <senior_product.wmb>; string safelevel_wmb = <safelevel.wmb>;
/////////////////////////////////////////////////////////////////////////
function game_init(); function mouse_over(); function mainmenu_mouse(); function start_game(); function set_volume(); function set_resolution(); function quit_game();
/////////////////////////////////////////////////////////////////////////
panel main_pan // main panel { bmap = main_bmp; layer = 20; pos_x = 220; // for now pos_y = 200; // for now button = 50, 65, new_bmp, new_bmp, new1_bmp, null, start_game, mouse_over; button = 50, 115, sound1_pcx, sound1_pcx, sound2_pcx, null, set_volume, mouse_over; button = 50, 165, video1_pcx, video1_pcx, video2_pcx, null, set_resolution, mouse_over; button = 50, 215, exit_bmp, exit_bmp, exit1_bmp, null, quit_game, mouse_over; flags = d3d, overlay, refresh; }
panel sound_pan // sound panel { bmap = sound_pcx; layer = 20; pos_x = 160; // for now pos_y = 240; // for now hslider = 60, 95, 200, slider_pcx, 0, 100, sound_vol; flags = d3d, overlay, refresh; }
panel video_pan // video resolution panel { bmap = video_pcx; layer = 20; pos_x = 160; // for now pos_y = 240; // for now hslider = 60, 95, 200, slider_pcx, 4, 8, video_value; flags = d3d, overlay, refresh; }
function main() { main1(); wait(5); //get past the wait functions in main1() and load properly on_esc = null; level_load (safelevel_wmb); wait (2); game_init(); // checks the Esc key state and changes the panels if needed main_pan.visible = on; // show the main panel mainmenu_mouse(); // and give me a cursor to play with vec_set (camera.pos, nullvector); // move camera to the origin while (game_started == 0) // we haven't pressed New yet { camera.pan += 0.3 * time; // rotate the camera gently camera.tilt += 0.1 * time; camera.roll += 0.05 * time; wait (1); } }
action eye_checker // attached to the sprite { my.oriented = on; }
function mouse_over() // is executed when we are over the menu buttons { play_sound (mouse_snd, 70); }
function mainmenu_mouse () { mouse_mode = 2; mouse_map = cursor_bmp; while (game_started == 0) { mouse_pos.x = pointer.x; mouse_pos.y = pointer.y; wait (1); } }
function start_game() { main_pan.visible = off; game_started = 1; mouse_mode = 0; level_load (senior_product_wmb); wait (2); camera.z = 220; camera.tilt = -90; }
function set_volume() // shows the sound panel { main_pan.visible = off; sound_pan.visible = on; }
function set_resolution() // shows the video panel { main_pan.visible = off; video_pan.visible = on; }
function quit_game() { exit; }
function game_init() // checks the Esc state and changes the panels accordingly { while (1) { // first of all, calculate pos_x and pos_y for all the panels // to make sure that they are centered at any resolution main_pan.pos_x = (screen_size.x - bmap_width(main_bmp)) / 2; main_pan.pos_y = (screen_size.y - bmap_height(main_bmp)) / 2; sound_pan.pos_x = (screen_size.x - bmap_width(sound_pcx)) / 2; sound_pan.pos_y = (screen_size.y - bmap_height(sound_pcx)) / 2; video_pan.pos_x = (screen_size.x - bmap_width(video_pcx)) / 2; video_pan.pos_y = (screen_size.y - bmap_height(video_pcx)) / 2; if (key_esc == 1) { while (key_esc == 1) {wait (1);} // wait for release if (main_pan.visible == on) { freeze_mode = 0; //let the player and everything move again main_pan.visible = off; mouse_mode = 0; // hide the cursor } else // main_pan isn't visible { freeze_mode = 1; //you just about turned on the menu, freeze the game if (sound_pan.visible == off && video_pan.visible == off) { main_pan.visible = on; game_started = 0; // stop the game mainmenu_mouse(); // show the cursor } } if (sound_pan.visible == on) { sound_pan.visible = off; main_pan.visible = on; } if (video_pan.visible == on) { video_pan.visible = off; main_pan.visible = on; if (int (video_value != video_mode)) // resolution has changed { switch_video (video_value, 16, 1); } } } wait (1); } } most of the defined stuff for variables I left out but I did put in the level's definitions just in case, if you want more just ask, I don't think I have any more loading stuff in this if you can't find anything I'll look again.
A clever person solves a problem. A wise person avoids it. --Einstein
Currently Codeing: Free Lite-C
|
|
|
Re: Error E1516
[Re: Trooper119]
#68143
03/25/06 17:27
03/25/06 17:27
|
Joined: Jul 2002
Posts: 4,436 Germany, Luebeck
Xarthor
Expert
|
Expert
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
|
Are you using the templates? And why do you use two main functions? One standart one and one written by yourself and calling the first outta it? So what you do is two level_loads after each other. I dunno if this is needed, but you could put that all together in one main function, would clear that up a bit.  Sry I didn't want to insult you, caus your posting the same thread twice. It was just friendly advice.
|
|
|
Re: Error E1516
[Re: Xarthor]
#68144
03/25/06 22:15
03/25/06 22:15
|
Joined: Apr 2004
Posts: 516 USA
Trooper119
OP
User
|
OP
User
Joined: Apr 2004
Posts: 516
USA
|
All I did was combine some functions and rearrange until everything worked the way I did before and when I was done I found that the error had disappeared. If it helps, here is my code, its long though. Code:
string senior_product_wmb = <senior_product.wmb>; string safelevel_wmb = <safelevel.wmb>;
/////////////////////////////////////////////////////////////////////////
var game_started = 0; // will be set to 1 when the game is started var sound_vol = 70; // default sound value at game start; sound_vol is an engine variable var video_value = 7; // default resolution at game start (800x600)
//////////////////////////////////////////////////////////////////////////
bmap main_bmp = <main.bmp>; bmap new_bmp = <new.bmp>; bmap new1_bmp = <new1.bmp>; bmap exit_bmp = <exit.bmp>; bmap exit1_bmp = <exit1.bmp>; bmap sound1_pcx = <sound1.pcx>; bmap sound2_pcx = <sound2.pcx>; bmap video1_pcx = <video1.pcx>; bmap video2_pcx = <video2.pcx>; bmap cursor_bmp = <cursor.bmp>;
bmap sound_pcx = <sound.pcx>; // sound volume panel bmap video_pcx = <video.pcx>; // video resolution panel bmap slider_pcx = <slider.pcx>;
//////////////////////////////////////////////////////////////////////////
sound mouse_snd = <mousesnd.wav>;
//////////////////////////////////////////////////////////////////////////
function game_init(); function mouse_over(); function mainmenu_mouse(); function start_game(); function set_volume(); function set_resolution(); function quit_game();
///////////////////////////////////////////////////////////////////////////
panel main_pan // main panel { bmap = main_bmp; layer = 20; pos_x = 220; // for now pos_y = 200; // for now button = 50, 65, new_bmp, new_bmp, new1_bmp, null, start_game, mouse_over; button = 50, 115, sound1_pcx, sound1_pcx, sound2_pcx, null, set_volume, mouse_over; button = 50, 165, video1_pcx, video1_pcx, video2_pcx, null, set_resolution, mouse_over; button = 50, 215, exit_bmp, exit_bmp, exit1_bmp, null, quit_game, mouse_over; flags = d3d, overlay, refresh; }
panel sound_pan // sound panel { bmap = sound_pcx; layer = 20; pos_x = 160; // for now pos_y = 240; // for now hslider = 60, 95, 200, slider_pcx, 0, 100, sound_vol; flags = d3d, overlay, refresh; }
panel video_pan // video resolution panel { bmap = video_pcx; layer = 20; pos_x = 160; // for now pos_y = 240; // for now hslider = 60, 95, 200, slider_pcx, 4, 8, video_value; flags = d3d, overlay, refresh; }
/////////////////////////////////////////////////////////////////////////
function main() { // set some common flags and variables // warn_level = 2; // announce bad texture sizes and bad wdl code tex_share = on; // map entities share their textures
// center the splash screen for non-640x480 resolutions, and display it splashscreen.pos_x = (screen_size.x - bmap_width(splashmap))/2; splashscreen.pos_y = (screen_size.y - bmap_height(splashmap))/2; splashscreen.visible = on; // wait 3 frames (for triple buffering) until it is flipped to the foreground wait(1);
// now load the level level_load(level_str); // freeze the game freeze_mode = 1;
// wait the required second, then switch the splashscreen off. sleep(1); splashscreen.visible = off; bmap_purge(splashmap); // remove splashscreen from video memory
// load some global variables, like sound volume load_status();
// display the initial message msg_show(mission_str,10);
// initialize lens flares when edition supports flares ifdef CAPS_FLARE; lensflare_start(); endif;
// use the new 3rd person camera move_view_cap = 1;
// un-freeze the game freeze_mode = 0;
// client_move(); // for a possible multiplayer game // call further functions here...
random_tunes();
on_esc = null; level_load (safelevel_wmb); wait (2); game_init(); // checks the Esc key state and changes the panels if needed main_pan.visible = on; // show the main panel mainmenu_mouse(); // and give me a cursor to play with vec_set (camera.pos, nullvector); // move camera to the origin while (game_started == 0) // we haven't pressed New yet { camera.pan += 0.3 * time; // rotate the camera gently camera.tilt += 0.1 * time; camera.roll += 0.05 * time; wait (1); } }
///////////////////////////////////////////////////////////////// // The following definitions are for the pro edition window composer // to define the start and exit window of the application. WINDOW WINSTART { TITLE "3D GameStudio"; SIZE 480,320; MODE IMAGE; //STANDARD; BG_COLOR RGB(240,240,240); FRAME FTYP1,0,0,480,320; // BUTTON BUTTON_START,SYS_DEFAULT,"Start",400,288,72,24; BUTTON BUTTON_QUIT,SYS_DEFAULT,"Abort",400,288,72,24; TEXT_STDOUT "Arial",RGB(0,0,0),10,10,460,280; }
/* no exit window at all.. WINDOW WINEND { TITLE "Finished"; SIZE 540,320; MODE STANDARD; BG_COLOR RGB(0,0,0); TEXT_STDOUT "",RGB(255,40,40),10,20,520,270;
SET FONT "",RGB(0,255,255); TEXT "Any key to exit",10,270; }*/
///////////////////////////////////////////////////////////////// //INCLUDE <debug.wdl>; //////////////////////////////////////////////////////////////////////////
action eye_checker // attached to the sprite { my.oriented = on; }
function mouse_over() // is executed when we are over the menu buttons { play_sound (mouse_snd, 70); }
function mainmenu_mouse () { mouse_mode = 2; mouse_map = cursor_bmp; while (game_started == 0) { mouse_pos.x = pointer.x; mouse_pos.y = pointer.y; wait (1); } }
function start_game() { main_pan.visible = off; game_started = 1; mouse_mode = 0; level_load (senior_product_wmb); wait (2); camera.z = 220; camera.tilt = -90; }
function set_volume() // shows the sound panel { main_pan.visible = off; sound_pan.visible = on; }
function set_resolution() // shows the video panel { main_pan.visible = off; video_pan.visible = on; }
function quit_game() { exit; }
function game_init() // checks the Esc state and changes the panels accordingly { while (1) { // first of all, calculate pos_x and pos_y for all the panels // to make sure that they are centered at any resolution main_pan.pos_x = (screen_size.x - bmap_width(main_bmp)) / 2; main_pan.pos_y = (screen_size.y - bmap_height(main_bmp)) / 2; sound_pan.pos_x = (screen_size.x - bmap_width(sound_pcx)) / 2; sound_pan.pos_y = (screen_size.y - bmap_height(sound_pcx)) / 2; video_pan.pos_x = (screen_size.x - bmap_width(video_pcx)) / 2; video_pan.pos_y = (screen_size.y - bmap_height(video_pcx)) / 2; if (key_esc == 1) { while (key_esc == 1) {wait (1);} // wait for release if (main_pan.visible == on) { freeze_mode = 0; //let the player and everything move again main_pan.visible = off; mouse_mode = 0; // hide the cursor } else // main_pan isn't visible { freeze_mode = 1; //you just about turned on the menu, freeze the game if (sound_pan.visible == off && video_pan.visible == off) { main_pan.visible = on; game_started = 0; // stop the game mainmenu_mouse(); // show the cursor } } if (sound_pan.visible == on) { sound_pan.visible = off; main_pan.visible = on; } if (video_pan.visible == on) { video_pan.visible = off; main_pan.visible = on; if (int (video_value != video_mode)) // resolution has changed { switch_video (video_value, 16, 1); } } } wait (1); } }
A clever person solves a problem. A wise person avoids it. --Einstein
Currently Codeing: Free Lite-C
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|