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 / Can't directly assign UDT from function into an array

Author
Message
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 18th May 2013 13:57
The following results in a generic app crash.




So instead I need to do this:




I have a vague memory of possibly seeing this mentioned within another thread somewhere, but I'm not 100% certain. It's only a minor annoyance and quite frankly I'm just thrilled to be able to return a UDT at all.

"You're all wrong. You're all idiots." ~Fluffy Rabbit
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 18th May 2013 18:26
There is a long history of problems with UDTs and arrays.

But it is good to see that it is now possible to return a UDT from a function.

I can imagine that handling a return from a function requires figuring out what sort of memory 'shape' the returned object is. By assigning it directly to a UDT (or float, or string, or integer) the process can know what the shape is. And the combination of UDT and array seems to complicate it.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
george++
AGK Tool Maker
17
Years of Service
User Offline
Joined: 13th May 2007
Location: Thessaloniki, Hellas
Posted: 18th May 2013 18:39
IMO: UDT's should have been error free from first time. They are essentials in programming...

Login to post a reply

Server time is: 2024-11-24 15:05:22
Your offset time is: 2024-11-24 15:05:22