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 / Tier 1 - Pass UDT to a function as a parameter

Author
Message
T3dd1n0us
12
Years of Service
User Offline
Joined: 24th Aug 2011
Location:
Posted: 24th Aug 2011 23:22
Hi All

Is it possible in Tier 1 to pass a user defined type as a parameter to a function?

Thanks
Daniel TGC
Retired Moderator
17
Years of Service
User Offline
Joined: 19th Feb 2007
Location: TGC
Posted: 25th Aug 2011 02:39 Edited at: 25th Aug 2011 02:52
Yes it is.

Method 1 - global


Method 2 - Passing into function and back out
BiggAdd
Retired Moderator
19
Years of Service
User Offline
Joined: 6th Aug 2004
Location: != null
Posted: 25th Aug 2011 03:18 Edited at: 25th Aug 2011 03:58
AGK supports passing a UDT into a function, and also returning a UDT from a function.
But at the moment passing a UDT into a function causes a crash. The bug as been reported and it will be fixed in the next update.

Passing UDT to Function (Will be fixed next update):


Returning UDT from function(Works!):


Login to post a reply

Server time is: 2024-03-28 21:38:58
Your offset time is: 2024-03-28 21:38:58