1 registered members (AndrewAMD),
1,481
guests, and 6
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Confused about Lite-C
#185106
02/22/08 15:29
02/22/08 15:29
|
Joined: Feb 2006
Posts: 52
carlpa
OP
Junior Member
|
OP
Junior Member
Joined: Feb 2006
Posts: 52
|
I am trying to learn how to use Lite-C. I wrote the following short program:
/////////////////////////////// #define PRAGMA_PATH "%EXE_DIR%\templates\images"; #define PRAGMA_PATH "%EXE_DIR%\templates\models"; #define PRAGMA_PATH "%EXE_DIR%\templates\sounds";
#include <acknex.h> #include <default.c> //#include <mtlFX.c> ///////////////////////////////
BMAP* pred = "red.pcx"; FONT* arial_font = "Arial#24"; STRING* sMessage = "My Panel "; int a;
PANEL* watcher = { bmap = pred; layer = 10; pos_x = 4; pos_y = 4; size_x = 400; size_y = 60; flags = VISIBLE; digits(4,0,sMessage,arial_font,1,0); }
int Finished(); { sys_exit("bye"); }
void main() { level_load("Ctest.WMB"); wait(2); printf("Here"); //OK to HERE while(1) { if (key_any) { str_cpy(sMessage, "Key Pressed"); if (engine_getscript("Finished")) Finished(); } //Finished is never called implying a null pointer wait(1); } }
Please help, I do not understand why Finished is not complied. I am sure it is in the manual but I do not even know how to look for this. Thanks.
Researcher & clinician. A6, A7, & A8 First computer a Commodore Pet
|
|
|
Re: Confused about Lite-C
[Re: carlpa]
#185107
02/22/08 15:52
02/22/08 15:52
|
Joined: Jan 2007
Posts: 221
Fenriswolf
Member
|
Member
Joined: Jan 2007
Posts: 221
|
Hello,
there is mistakenly a semicolon at the end of the following line: int Finished() ;
Remove it and your function should be compiled properly.
Last edited by Fenriswolf; 02/22/08 15:53.
|
|
|
Re: Confused about Lite-C
[Re: Fenriswolf]
#185108
02/22/08 15:58
02/22/08 15:58
|
Joined: Feb 2006
Posts: 52
carlpa
OP
Junior Member
|
OP
Junior Member
Joined: Feb 2006
Posts: 52
|
Thank you, I feel very stupid. I know this having done much programing. I can only apologize for taking up people's time to deal with my ADD. Agin, sorry and thank you very much.
Researcher & clinician. A6, A7, & A8 First computer a Commodore Pet
|
|
|
|