Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (TipmyPip, AndrewAMD, NewbieZorro), 16,055 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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 | 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