Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 02/21/26 19:15
Camera always moves upwards?
by clonman. 02/21/26 09:29
Zorro version 3.0 prerelease!
by TipmyPip. 02/20/26 13:22
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
0 registered members (), 6,962 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
alx, ApprenticeInMuc, PatrickH90, USER0328, Sfrdragon
19199 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
little questions about lite-C #330854
06/30/10 09:46
06/30/10 09:46
Joined: Dec 2003
Posts: 988
Germany, Magdeburg
JoGa Offline OP
User
JoGa  Offline OP
User

Joined: Dec 2003
Posts: 988
Germany, Magdeburg
Hey
I worked with A6 nad c-script, now I installed A7 extra and I am testing it.
But I have some problems with lite-C:
-when i include with
Code:
#include "init.c"

a new codefile, the engine shwos me an error: error in init.c "functions" undeclared identifier <functions test()>

here is the start of ini.c (just a test)
Code:
// init.c
functions test()
{
	wait(1);
}
BMAP* arrow_bmap = "arrow.bmp";


the content of this file doesn't matter - i comment the function with "//" and then the engine emit the same error, but with the
Code:
BMAP* arrow_bmap

as element of the error.

Another question I have:
Do you know some basic explanation about the files, nowaday osed in scripting of A7?
For example, i added in WED in presents->paths some paths, but WED wrote a new wdl-fil(old A6?) in my file folder.
Or the difference between the *.c and *.h - files.

Thanks for your answers laugh

Last edited by JoGa; 06/30/10 09:46.
Re: little questions about lite-C [Re: JoGa] #330858
06/30/10 09:59
06/30/10 09:59
Joined: Jun 2006
Posts: 379
Flevoland, 5 meters under wate...
Roel Offline
Senior Member
Roel  Offline
Senior Member

Joined: Jun 2006
Posts: 379
Flevoland, 5 meters under wate...
At first:
I think that you forgot to #include <acknex.h>


Check out the throwing game here: The throwing game
Re: little questions about lite-C [Re: JoGa] #330859
06/30/10 10:01
06/30/10 10:01
Joined: Jul 2007
Posts: 620
Turkey, Izmir
Emre Offline
User
Emre  Offline
User

Joined: Jul 2007
Posts: 620
Turkey, Izmir
you must use "function", not "functions"
edit: and this is not contribution. laugh

Last edited by Emre; 06/30/10 10:05.
Re: little questions about lite-C [Re: Emre] #330863
06/30/10 10:21
06/30/10 10:21
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
I agree with both Roel and Emre.
"functions" is incorrect and will generate an error every time,
and make sure the first line of your main script is either
#include <acknex.h>(preferred) or #include <lite-c.h> for legacy mode.
(dont ask me to explain legacy mode as I could never figure it out...)

AFAIK, there is no "real" difference between *.c and *.h files.
I its just a convention that *.c files you may need to modify to suit
your application of them, but *.h files should remain untouched.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: little questions about lite-C [Re: EvilSOB] #330868
06/30/10 10:40
06/30/10 10:40
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
*.h files are header files, they only contain function prototypes and some other definitions, but no implementation of your functions.
(I don't use header files at all.)
*.c files contain the implementation of your prototypes. You can write your whole program in *.c files like you did with *.wdl.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: little questions about lite-C [Re: Superku] #331050
07/01/10 18:30
07/01/10 18:30
Joined: Jul 2004
Posts: 1,710
MMike Offline
Serious User
MMike  Offline
Serious User

Joined: Jul 2004
Posts: 1,710
Thaks for the explanation i also never thought about that headers...
So that "level of organization" will avoid function ordering, since you put all function as prototypes in the header.


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