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 Chat / (Tier 1) Type refuse to work right from inside function

Author
Message
basicFanatic
1
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 5th Jun 2018 18:24
I just wanted to make my animated plane a bit neater, but got stuck: When I transfer the type code to a function, the code simply refuses to work!

Attachments

Login to view attachments
puzzler2018
1
Years of Service
Recently Online
Joined: 8th Oct 2017
Location:
Posted: 5th Jun 2018 18:41
Change your function from

function incPlaneAnimation (animationID as planeAniationType)

to

function incPlaneAnimation (animationID ref as planeAniationType)





basicFanatic
1
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 5th Jun 2018 19:38
Thanks, that worked! I think I almost sorta kinda understands what the word "ref" is doing and as mentioned, the stuff works so all is good!
puzzler2018
1
Years of Service
Recently Online
Joined: 8th Oct 2017
Location:
Posted: 5th Jun 2018 19:52
It got me bewildered a long time ago how and what it does

It allows to pass type variables into a function that can be modified within

More info, if you like to do some light reading- https://www.appgamekit.com/documentation/guides/12_array_changes.htm

Login to post a reply

Server time is: 2018-10-16 19:39:28
Your offset time is: 2018-10-16 19:39:28