acknex.exe problem

Posted By: gamingfan101

acknex.exe problem - 06/26/09 00:28

Hi, i looked in the workshops and couldnt find anything on this, when i start my program it comes up as a black screen with nothing on it at all. When i close it it just doesnt do anything. Any ideas? Thanks!
Posted By: Schmerzmittel

Re: acknex.exe problem - 06/26/09 00:41

What do you start? Your Game or the SED, WED, MED?

If you start the Game, what does the acklog.txt say?
Posted By: gamingfan101

Re: acknex.exe problem - 06/26/09 00:51

considering i use the free version i use the test run option, and it doesnt have any run-time errors, it just comes up with a black screen.
Posted By: Damocles_

Re: acknex.exe problem - 06/26/09 00:59

Did you try a demo of someone else,
does this also show up black?
Posted By: gamingfan101

Re: acknex.exe problem - 06/26/09 01:49

all of my other programs work fine, and this one does untill i get so far. I dont have any idea whats going on.
Posted By: gamingfan101

Re: acknex.exe problem - 06/26/09 01:55

I think whats causing it is my TEXTs heres my code, can anyone find a problem with it?


///////////////////////////////////////////////////////////////////////////////////
#include <acknex.h>
#include <default.c>
///////////////////////////////////////////////////////////////////////////////////

BMAP* mouse_bmp = "gold_cursor.bmp";
STRING* header_str = "BOXIE";
STRING* maingame_str = "MAIN GAME";
STRING* endurance_str = "ENDURANCE";
STRING* credits_str = "CREDITS";
STRING* exit_str = "EXIT";
FONT* header_font = "reprise title#50b";
FONT* option_font = "reprise stamp#20b";


///////////////////////////////////////////////////////////////////////////////////
TEXT* header_txt =
{
pos_x = 300;
pos_y = 20;
string = header_str;
font = header_font;
layer = 1;
flags = SHOW;
}

TEXT* maingame =
{
pos_x = 10;
pos_y = 200;
string = maingame_str;
font = option_font;
layer = 1;
flags = SHOW;
}

PANEL* endurancebutton =
{
pos_x = 10;
pos_y = 200;
layer = 1;
button(0, 0, "goclicked.bmp", "gonorm.bmp", "goover.bmp", quit_program, NULL, NULL);
flags = OVERLAY | SHOW;
}

PANEL* creditsbutton =
{
pos_x = 10;
pos_y = 300;
layer = 1;
button(0, 0, "goclicked.bmp", "gonorm.bmp", "goover.bmp", quit_program, NULL, NULL);
flags = OVERLAY | SHOW;
}
////////////////////////////////////////////////////////////////////////////////////

function main()
{
mouse_map = mouse_bmp;
mouse_mode = 4;
}

function quit_program()
{
while (key_any) { wait (1); }
sys_exit(NULL);
}
Posted By: EvilSOB

Re: acknex.exe problem - 06/26/09 02:13

It LOOKS ok, but try it with
string (header_str); and string (maingame_str);
instead of the "string =" format.

And maybe change your sys_exit to be sys_exit("");
Posted By: gamingfan101

Re: acknex.exe problem - 06/26/09 02:26

nope, still doesnt work. I thought maybe something wasnt installed correctly and so i reinstalled it, but that didnt work either. I've tried programming it a little differently, and that doesnt help, yet all my other programs work fine. So i dont know.
Posted By: EvilSOB

Re: acknex.exe problem - 06/26/09 02:33

Code:
function main()
{
   level_load(NULL);
   mouse_map = mouse_bmp;
   mouse_mode = 4;
}


Posted By: gamingfan101

Re: acknex.exe problem - 06/26/09 02:37

nope, still doesnt work.
Posted By: paracharlie

Re: acknex.exe problem - 06/26/09 05:41

Try this: Otherwise I dont know either, everything looks fine.

function quit_program()
{
while (key_any) { wait (1); }
sys_exit(NULL);
}

function main()
{
mouse_map = mouse_bmp;
mouse_mode = 4;
quit_program();
}
Posted By: gamingfan101

Re: acknex.exe problem - 06/26/09 05:57

ok, i started over and checked the program as i went. It only messes up once i put in the TEXT. here are the definitions and the text code.

STRING* main_str = "MAIN GAME";
STRING* endu_str = "ENDURANCE MODE";
STRING* cred_str = "CREDITS";
STRING* exit_str = "EXIT";
FONT* header_font = "reprise title#50b";
FONT* options_font = "reprise stamp#10b";

TEXT* main_txt =
{
pos_x = 30;
pos_y = 100;
font = options_font;
string = main_str;
flags = SHOW;
}

EDIT: Ok, i just found out that when i take the * away from the TEXT, everything shows back up again accept for the text. I dont know if that normally happens, but i thought anything could make a difference.

Posted By: paracharlie

Re: acknex.exe problem - 06/26/09 07:27

Well this works for sure. Test your font and make sure your main function is capable of displaying it.

#include <acknex.h>
#include <default.c>

STRING* main_str = "MAIN GAME";

TEXT* main_txt = {
pos_x = 30;
pos_y = 100;
string = main_str;
flags = SHOW;
}

function main(){
video_mode = 7;
screen_color.blue = 150;
}
Posted By: gamingfan101

Re: acknex.exe problem - 06/29/09 22:19

well, i've tried everything i can think of but it still doesnt want to work. My whole program including bmaps and buttons will work, but once i add one TEXT, the program will open, but the screen is black, the cursor isnt mine, and it says that the acknex.exe is not responding. Any other ideas? thanks!
Posted By: paracharlie

Re: acknex.exe problem - 06/30/09 20:48

I took your example and tested it with some resources that I have. It works fine so Like I said before check your font and bmaps otherwise your code is functional. Here is how I tested it. Couple very small changes overall.
If you want text on a button the easiest way is just to create a button with text already on a button, then you dont have to worry about placing text on a empty button, because it can be twice as much work.
Code:
///////////////////////////////////////////////////////////////////////////////////
#include <acknex.h>
#include <default.c>
///////////////////////////////////////////////////////////////////////////////////

BMAP* mouse_bmp = "cursor.tga";
STRING* header_str = "BOXIE";
STRING* maingame_str = "MAIN GAME";
STRING* endurance_str = "ENDURANCE";
STRING* credits_str = "CREDITS";
STRING* exit_str = "EXIT";
FONT* header_font = "menufont.bmp";
//FONT* option_font = "reprise stamp#20b";


///////////////////////////////////////////////////////////////////////////////////
TEXT* header_txt =
{
pos_x = 300;
pos_y = 20;
string(header_str);
font = header_font;
layer = 1;
flags = SHOW;
}

TEXT* maingame =
{
pos_x = 10;
pos_y = 200;
string(maingame_str);
font = header_font;
layer = 2; //if you want text to appear on top of button you have to layer over the button.
flags = SHOW;
}

PANEL* endurancebutton =
{
pos_x = 10;
pos_y = 200;
layer = 1;
button(0, 0, "forward1.pcx", "forward1.pcx", "forward2.pcx", quit_program, NULL, NULL);
flags = OVERLAY | SHOW;
}

PANEL* creditsbutton =
{
pos_x = 10;
pos_y = 300;
layer = 1;
button(0, 0, "forward1.pcx", "forward1.pcx", "forward2.pcx", quit_program, NULL, NULL);
flags = OVERLAY | SHOW;
}
////////////////////////////////////////////////////////////////////////////////////

function main()
{
mouse_map = mouse_bmp;
mouse_mode = 4;
video_mode = 7; 
screen_color.blue = 150;
}

function quit_program()
{
while (key_any) { wait (1); }
sys_exit(NULL);
}




Posted By: gamingfan101

Re: acknex.exe problem - 06/30/09 21:28

so the code should work fine? and i didnt want the text over the button, if that has anything to do with it.
Posted By: paracharlie

Re: acknex.exe problem - 06/30/09 22:08

Your code did work fine for me yes using my own resources.
Posted By: 4gottenname

Re: acknex.exe problem - 06/30/09 22:37

I had a similar problem a day ago. The engine didn't like my SOUNDS* defenition. Gave me a black screen (no panels, buttons or texts showing). Still not sure why but changing the name solved my problem, but seems like you already done that. A bit unclear for me if you got problems with all TEXTs or just the "main" one.
Have you tried to comment // string = main_str;
and see if anything shows up then? (the text wont ofc, its just to test if it has to do with the string and not the *) or using a standard font like others have sugested?

Posted By: gamingfan101

Re: acknex.exe problem - 06/30/09 23:20

oh, ok. Apparently the engine first says that the fonts are usable, but i changed the font and it works now. Im really sorry for bugging you all with this considering it was a pretty simple solution.
© 2024 lite-C Forums