2 registered members (AndrewAMD, juanex),
1,240
guests, and 8
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Lite-c programming doesn't work!
#231775
10/16/08 21:16
10/16/08 21:16
|
Joined: Oct 2008
Posts: 58
Marc_Gagne
OP
Junior Member
|
OP
Junior Member
Joined: Oct 2008
Posts: 58
|
Good day, my name is Marc. I have recently purchased the Commercial edition of the Gamestudio A7 engine. Shortly after I downloaded the workshops. I read them, opened the sample files, etc. All was well. I was truly amazed by the power of the Lite-c programming language. That's when I hit a little snag: when I tried to program my own files, it didn't work! I even copied and pasted the code from the lite-c sample files but that didn't work either!I tried saving my script under different file extensions but that didn't work either! I tried to open the sample files again. They worked, but the instant I copied the text id didn't work. Please help me!!!!!!!!!!! Marc
|
|
|
Re: Lite-c programming doesn't work!
[Re: Marc_Gagne]
#231779
10/16/08 21:51
10/16/08 21:51
|
Joined: Oct 2007
Posts: 5,210 İstanbul, Turkey
Quad
Senior Expert
|
Senior Expert
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
|
your files must be .c files. if you dont add any extension while saving, sed will save it as .wdl file.
3333333333
|
|
|
Re: Lite-c programming doesn't work!
[Re: Quad]
#231781
10/16/08 22:03
10/16/08 22:03
|
Joined: Oct 2008
Posts: 58
Marc_Gagne
OP
Junior Member
|
OP
Junior Member
Joined: Oct 2008
Posts: 58
|
|
|
|
Re: Lite-c programming doesn't work!
[Re: Pappenheimer]
#231785
10/16/08 22:30
10/16/08 22:30
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
Also have a look in the folder your script lives in and open the "acklog.txt" file and have a read through. That may help.
If you cant make sense of it, or cant see anything important, post its contents here.
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
Re: Lite-c programming doesn't work!
[Re: EvilSOB]
#231786
10/16/08 22:52
10/16/08 22:52
|
Joined: Oct 2007
Posts: 5,210 İstanbul, Turkey
Quad
Senior Expert
|
Senior Expert
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
|
do you see any error messages, or engine producing eny acklog.txt file?
3333333333
|
|
|
Re: Lite-c programming doesn't work!
[Re: Quad]
#231788
10/16/08 23:16
10/16/08 23:16
|
Joined: Apr 2006
Posts: 737 Ottawa, Canada
Ottawa
User
|
User
Joined: Apr 2006
Posts: 737
Ottawa, Canada
|
Hi Marc You will find an example of a main function in the Gstudio directory under templates6 Look at the codes for A7_project...short but it's a main it's a start. Salut Ottawa
Last edited by Ottawa; 10/16/08 23:17.
|
|
|
Re: Lite-c programming doesn't work!
[Re: Quad]
#231789
10/16/08 23:22
10/16/08 23:22
|
Joined: Oct 2008
Posts: 58
Marc_Gagne
OP
Junior Member
|
OP
Junior Member
Joined: Oct 2008
Posts: 58
|
Well this is the script I tried (you will notice that it's the same code from Workshop 2, except that it's been saved under another name): //////////////////////////////////////////////////////////////////// #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); } In the folder where this script lives there's a file called OUIETERR.txt, and this is what's written it (it's the same as the error message I get when I test the script):
< #include <acknex.h> #include <default.c> var a = 0;> ATEST.WDL 5:0 (): Script error - no C code in .WDL scripts!
< PANEL* panDisplay = {> ATEST.WDL 12:0 (): Parameter unknown PANEL* bad keyword in { }
< digits(35, 10, "a = %0.f", *, 1, a);> ATEST.WDL 13:0 (): Parameter unknown digits bad keyword in { }
< digits(35, 19, "b = %0.f", *, 1, b);> ATEST.WDL 14:0 (): Parameter unknown digits bad keyword in { }
< digits(35, 28, "c = %0.f", *, 1, c);> ATEST.WDL 15:0 (): Parameter unknown digits bad keyword in { }
< flags = VISIBLE;> ATEST.WDL 16:0 (): Parameter unknown flags bad keyword in { }
< function^main() {> ATEST.WDL 22:1 (): Script error missing bracket
Could you please tell me what this means?
|
|
|
|