Gamestudio Links
Zorro Links
Newest Posts
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,481 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19058 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Confused about Lite-C #185106
02/22/08 15:29
02/22/08 15:29
Joined: Feb 2006
Posts: 52
C
carlpa Offline OP
Junior Member
carlpa  Offline OP
Junior Member
C

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
F
Fenriswolf Offline
Member
Fenriswolf  Offline
Member
F

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
C
carlpa Offline OP
Junior Member
carlpa  Offline OP
Junior Member
C

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
Re: Confused about Lite-C [Re: carlpa] #185109
02/23/08 17:50
02/23/08 17:50
Joined: Jul 2005
Posts: 1,002
Trier, Deutschland
Nowherebrain Offline
Serious User
Nowherebrain  Offline
Serious User

Joined: Jul 2005
Posts: 1,002
Trier, Deutschland
I'm having some issues(after deciding to jump back into lite_c)with paths...
I've tried the defined paths posted above to no avail..my master drive is "E", I hope that is not a problem.
could anyone post a simple example...I'm trying to get to work\terrain...thanks


Everybody Poops.
here are some tutorials I made.
http://www.acknexturk.com/blender/
Re: Confused about Lite-C [Re: Nowherebrain] #185110
02/23/08 18:18
02/23/08 18:18
Joined: Jul 2005
Posts: 1,002
Trier, Deutschland
Nowherebrain Offline
Serious User
Nowherebrain  Offline
Serious User

Joined: Jul 2005
Posts: 1,002
Trier, Deutschland
well I got it to work going through every different variation I could and this is what worked in the end...

#define PRAGMA_PATH "%EXE_DIR%\\work\\terrain"

*note* there is no semicolon and the use of double back slashes...so "in case"anyone has the same problem try the previous define.
thanks all.


Everybody Poops.
here are some tutorials I made.
http://www.acknexturk.com/blender/
Re: Confused about Lite-C [Re: Nowherebrain] #185111
02/23/08 20:42
02/23/08 20:42
Joined: Jul 2005
Posts: 1,002
Trier, Deutschland
Nowherebrain Offline
Serious User
Nowherebrain  Offline
Serious User

Joined: Jul 2005
Posts: 1,002
Trier, Deutschland
temp= undefined?
how do i define it?

define temp;
fixed???
I forget how to do this it has been a while(I probably never figured it out lol).


Everybody Poops.
here are some tutorials I made.
http://www.acknexturk.com/blender/
Re: Confused about Lite-C [Re: Nowherebrain] #185112
02/23/08 21:03
02/23/08 21:03
Joined: Jul 2005
Posts: 1,002
Trier, Deutschland
Nowherebrain Offline
Serious User
Nowherebrain  Offline
Serious User

Joined: Jul 2005
Posts: 1,002
Trier, Deutschland
uhh yeah, got it, just set a "VECTOR" variable to temp. I'm an idiot


Everybody Poops.
here are some tutorials I made.
http://www.acknexturk.com/blender/

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

Gamestudio download | chip programmers | 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