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 / User combined types - impossible?

Author
Message
Engineer
10
Years of Service
User Offline
Joined: 16th Jul 2014
Location:
Posted: 4th Mar 2015 10:25 Edited at: 4th Mar 2015 11:25
Hi all!
Writing program uses map data.
I need a custom data types that consist of just my type. See the code.
Once I start to enter into these types of program - AppGameKit ceases normal and stable work.
Nested types are not possible?


I will explain - when you try to return the data of type t_Tile of the function and use them, for example to create a sprite, the program terminates abnormally

AGK 2 !
paulrobson
10
Years of Service
User Offline
Joined: 22nd Nov 2014
Location: Norfolk, England
Posted: 4th Mar 2015 11:32
I don't think you can return non atomic types from a function OTOMH ? I don't think the language semantics really support it.

If you want to return a type of type t_tile you can pass it as a reference parameter.
Engineer
10
Years of Service
User Offline
Joined: 16th Jul 2014
Location:
Posted: 4th Mar 2015 11:45 Edited at: 4th Mar 2015 12:06
paulrobson, thanks!

please, "If you want to return a type of type t_tile you can pass it as a reference parameter."

mean - try to check the return values of the set of control?

Actually works for me is one kind of this program with nested composite types, I decided to remake - to simplify the program due to the complexity of the data type. In particular t_point.
Then the program has stopped working. Cut out everything and bring out the most basic functions of the new, I found that trying to isolzovat data returned leads to abnormal program stops. While not trying to position or create a sprite from the image, which is obtained (it is actually received and stored function on the disk).

Upload testing files

AGK 2 !

Attachments

Login to view attachments
Engineer
10
Years of Service
User Offline
Joined: 16th Jul 2014
Location:
Posted: 4th Mar 2015 12:52
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 4th Mar 2015 14:50
Quote: "This video is private"


Quidquid latine dictum sit, altum sonatur
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 10th Mar 2015 17:35
Thanks for the example project, you found a very obscure crash bug when passing a type (or array) returned from one function to multiple sub functions. Fixed for the next version.
Engineer
10
Years of Service
User Offline
Joined: 16th Jul 2014
Location:
Posted: 10th Mar 2015 19:03 Edited at: 10th Mar 2015 19:15
Paul, AppGameKit excellent returns complex user-defined types. The problem is that if there are different functions of user-defined type variables with the same name, even though one of them, this variable is not used, then somehow gets out mistake ... I noticed something similar in the summer version 108.24, even became all explanatory variables to assign different names
And just super product you make. Still vibration ... and notice the background for tier1

This is one problem - Solved: http://forum.thegamecreators.com/?m=forum_view&t=213812&b=41

AGK 2 !

Login to post a reply

Server time is: 2024-11-25 18:57:06
Your offset time is: 2024-11-25 18:57:06