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 Studio Chat / multi dimensional global arrays in inserted files dont work as supposed in studio?

Author
Message
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 23rd Oct 2019 21:37 Edited at: 23rd Oct 2019 21:38
I have many files in my project and use the insert file command and this have worked in classic very well.
#insert "System_Boot.agc"
But it seams very random in studio and i nead to create a array like this in the main file before the file is inserted instead now.
Global Dim Map_Grid_Data[33,33]

Or the array do not create properly?

I noticed this because i want to read in the file in to an array before creating the map now.
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 23rd Oct 2019 22:52
Is #insert "System_Boot.agc" in main
fubarpk
fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 25th Oct 2019 00:13
insert will insert the code at the point of the insert command.
if that is not necessary then maybe try #include
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 27th Oct 2019 17:25 Edited at: 27th Oct 2019 17:27
Yes and thats the weird part.
insert where added to get rid of the globals bug with include but seams to be back in studio on insert?
I can track it partially with that if i dont assign a value so do the error come but sometimes if i put variables in to the array straight after so does it work?
But have to double check a couple of times because the game code is huge right now?

Only get the bug in studio not classic if i remember it right also?
But have to double check?

I work so much right now so i could have a brain overload also
Loktofeit
AGK Developer
15
Years of Service
User Offline
Joined: 21st Jan 2009
Location: Sarasota, FL
Posted: 29th Oct 2019 15:25
TIL the answer to my problem of some #include(d) code resulting in errors because the program isn't seeing the code wher I did the #include. I need to be using #insert for those.

Login to post a reply

Server time is: 2024-04-25 11:59:08
Your offset time is: 2024-04-25 11:59:08