Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / #include Files

Author
Message
JLMoondog
Moderator
16
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Paradox
Posted: 15th Dec 2014 19:11 Edited at: 15th Dec 2014 19:13
I've been getting fancy with my newest project and creating separate files to handle different types of functions. Everything has been going really smooth until now.

I've decided to make a key-binding include, would come in handy for other projects along with the function include files, and create a key binding array / functions. Now according to the help file, unless I'm miss-reading it, it says you can have an array in an include file with the latest AGK2 build...but unfortunately during compile the main.agc file treats the array like it doesn't exist. So are we able to have an array in an include file or did I misread that?

I know the array and function work, as I went ahead and copy/pasted it into the main.agc file and it worked perfectly. Not a big deal, but the help file is a bit confusing on it's wording. It makes it seem like you can indeed declare a type and array in an include file to be used in the main project file.

<a href="http://www.slidedb.com/games/kayak-escape" title="View Kayak Escape! on Slide DB" target="_blank"><img src="http://button.slidedb.com/popularity/medium/games/34310.png" alt="Kayak Escape!" /></a>
Markus
Valued Member
21
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 15th Dec 2014 19:24 Edited at: 15th Dec 2014 19:25
the #include add the file at end of main file, not at the pos. #include stand.

there is a "new" command
#insert "player.agc"

AGK 108 (B)19 + AppGameKit V2 Alpha .. : Windows 8.1 Pro 64 Bit : AMD Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 16th Dec 2014 01:29
You should be able to include arrays in #includes and have them work as if they were in the main.agc file, are you using the format "global arrayname as integer[5]"?

Login to post a reply

Server time is: 2025-05-24 00:19:40
Your offset time is: 2025-05-24 00:19:40