Gamestudio Links
Zorro Links
Newest Posts
Lapsa's very own thread
by Lapsa. 06/20/26 18:18
Ranger by Robert Pardo - now for Zorro
by Smallz. 06/20/26 11:23
Z12 live performance
by jcl. 06/19/26 11:21
Z9 getting Error 058
by jcl. 06/16/26 09:51
How to select between IB accounts by script?
by AndrewAMD. 06/13/26 15:44
Zorro tutorial ideas?
by AndrewAMD. 06/13/26 15:01
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
4 registered members (Grant, TipmyPip, monarch, Lapsa), 7,023 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Student_64151, Koti, curry, DeepxKalsi, Samed
19219 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
#include #341704
09/19/10 15:46
09/19/10 15:46
Joined: Sep 2010
Posts: 12
Iceland
B
bjarni Offline OP
Newbie
bjarni  Offline OP
Newbie
B

Joined: Sep 2010
Posts: 12
Iceland
Hi, I have file splash.c with one funcion call_splash() and a second file main.c and want to call call_splash() from that one..

after 2 hours of trying i could use help with that wink

Re: #include [Re: bjarni] #341706
09/19/10 16:00
09/19/10 16:00
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
make sure they're in the same folder for this example

main.c:
Code:
#include <acknex.h>
#include <default.c>

#include "splash.c" //make sure these are quotes not angular brackets

void main(){
   wait(1);
   call_splash();
}



splash.c:
Code:
function call_splash(){
   beep();
}



Re: #include [Re: MrGuest] #341708
09/19/10 16:05
09/19/10 16:05
Joined: Sep 2010
Posts: 12
Iceland
B
bjarni Offline OP
Newbie
bjarni  Offline OP
Newbie
B

Joined: Sep 2010
Posts: 12
Iceland
this was the trick #include "splash.c"

i tried with this #include <splash.c> for last 2 hours

what is the different?

and MrGuest thanks again.

Re: #include [Re: bjarni] #341709
09/19/10 16:10
09/19/10 16:10
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
#include <> tries to include the file from the include directory. #include "" tries to include it from the current directory relative to the current file


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Re: #include [Re: WretchedSid] #341711
09/19/10 16:24
09/19/10 16:24
Joined: Sep 2010
Posts: 12
Iceland
B
bjarni Offline OP
Newbie
bjarni  Offline OP
Newbie
B

Joined: Sep 2010
Posts: 12
Iceland
super.


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