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 / Arrays within User Types?

Author
Message
Pbcrazy
16
Years of Service
User Offline
Joined: 25th Sep 2008
Location: ...pillow room...
Posted: 25th Nov 2011 19:53
Alrighty, I was attempting to recreate a simple 2D tile based engine I had played with long ago, however I've run into a problem.

I was attempting to create a type for my maps. And within each map, there are supposed to be an array of tiles. However, the compiler keeps telling me that this is not possible.



And erroring out on this line...



Any help would be greatly appreciated!

The voices in my head said I'm normal... o.0
Hodgey
15
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 25th Nov 2011 22:38
Unfortunately arrays within types aren't supported at the moment however there may be plans to have it supported later. It all depends on what TGC thinks of it.

Now for the workarounds. Take a look at this thread. You'll need to scroll down to the last couple of posts but there is a workaround explained there.

The other solution is to switch to Tier 2 and use C++ where arrays in classes are supported.

Good luck with your game.

Pbcrazy
16
Years of Service
User Offline
Joined: 25th Sep 2008
Location: ...pillow room...
Posted: 26th Nov 2011 06:59
Ahh, how sad. I hope they get implemented at some point, really handy feature. I'm surprised it wasn't automatically included.

That workaround is doable, little bit ugly, but doable.

Though, working in C++ doesn't sound like too bad an idea either...

Thanks for the help! Let's see how this works out.

The voices in my head said I'm normal... o.0

Login to post a reply

Server time is: 2024-11-22 15:17:06
Your offset time is: 2024-11-22 15:17:06