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,425 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
Can't Compile? #200433
04/04/08 02:09
04/04/08 02:09
Joined: Mar 2008
Posts: 73
America: New Jersey
Masna Offline OP
Junior Member
Masna  Offline OP
Junior Member

Joined: Mar 2008
Posts: 73
America: New Jersey
Hi all,
I was working with the 2nd lite-c work shop when it told me to test run the make-shift calculator. It then said "Can't comile". Is there something wrong with my preferences, code? If anyone knows what i'm doing wrong that would be great. Heres the code i'm using:

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

var a = 0;
var b = 0;
var c = 0;

/////////////////////////////////////////////////////////////////////

PANEL* panDisplay =
{
digits(35, 10, "a = %0.f", *, 1, a);
digits(35, 19, "b = %0.f", *, 1, b);
digits(35, 28, "c = %0.f", *, 1, c);
flags = VISIBLE;
}

/////////////////////////////////////////////////////////////////////

function main()
{
video_mode = 7; // create a program window of 800x600 pixels
screen_color.blue = 150; // and make its background dark blue
while (1)
{
c = a + b;
wait (1);
}
}

Re: Can't Compile? [Re: Masna] #200435
04/04/08 02:32
04/04/08 02:32
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
The example you posted runs like a charm on my system. No compiler errors or warnings. Ensure you saved the file as .c file, not as .wdl file. Additionally have a look if this script is really the one that won't compile. You can press Alt + F5 to make the current script the one that is taken as the main script.

Other than that your program won't do anything sensefull. As you declared a,b and c as zero the numbers will never change at all.


Always learn from history, to be sure you make the same mistakes again...
Re: Can't Compile? [Re: Uhrwerk] #200513
04/04/08 14:32
04/04/08 14:32
Joined: Jul 2007
Posts: 959
nl
F
flits Offline
User
flits  Offline
User
F

Joined: Jul 2007
Posts: 959
nl
dont forget to include the #include <acknex.h>
else it dont knows the lite-c stuff


"empty"
Re: Can't Compile? [Re: Uhrwerk] #200525
04/04/08 15:34
04/04/08 15:34
Joined: Mar 2008
Posts: 67
crumply Offline
Junior Member
crumply  Offline
Junior Member

Joined: Mar 2008
Posts: 67
 Originally Posted By: Uhrwerk
The example you posted runs like a charm on my system. No compiler errors or warnings. Ensure you saved the file as .c file, not as .wdl file.


THIS. Jesus the number of time's I've fallen foul of my old ways!

Re: Can't Compile? [Re: crumply] #200635
04/04/08 23:29
04/04/08 23:29
Joined: Mar 2008
Posts: 73
America: New Jersey
Masna Offline OP
Junior Member
Masna  Offline OP
Junior Member

Joined: Mar 2008
Posts: 73
America: New Jersey
Thanks guys,
I just had to change it to a c. file. (Duh!)

Re: Can't Compile? [Re: Masna] #200641
04/05/08 00:09
04/05/08 00:09
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
*lol* Happened a few times to me. For any reasons SED always saves as a.wdl file, when not explicitely writing .c in the save dialog. :-)


Always learn from history, to be sure you make the same mistakes again...

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