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 / Passed Parameter value incorrect - bug?

Author
Message
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 11th Sep 2013 12:32 Edited at: 11th Sep 2013 12:33
In this T1 code, I pass a number of parameters to a function, and I think it is corrupting the value. So my question is whether I have done something very silly or I am actually interpreting this correctly. You can assume the debug functions are correct as they report exactly the same symptoms as the AppGameKit crash message.

This is where I call the function (I have added line breaks for legibility):



The debugWrite() outputs:
Quote: "7.027 Adding Scale Template 1 Group 0 Object 3"


In the function I have added a debugWrite() as the first command:



The output of DebugWrite() is:
Quote: "7.027 Group = 0 Object = 1120403456"


Object = 1120403456!!!

Am I going mad or have I pushed AppGameKit over the edge? The current program is currently 8,000+ lines of code and contains

around 17 code files,
30 or so arrays, most of them typed, averaging 100 elements each. The types are around 10 variables each and some contain sub-types
200+ functions

Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 11th Sep 2013 13:11 Edited at: 11th Sep 2013 13:12
there is a parameter limit of 9 i believe without compiler error...
maybe you can exchange with one user defined type.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 11th Sep 2013 13:28
Quote: "maybe you can exchange with one user defined type"


That would make my code so much neater, thank you!
This is my code converted from DBP so some things are a little bit different.

I have tested and it works if I convert my 6 vector parameters to 2 vector3 types (6 parameters down to 2).

Thanks again

AgentSam
12
Years of Service
User Offline
Joined: 14th Mar 2012
Location: Virtual Space
Posted: 11th Sep 2013 13:30 Edited at: 11th Sep 2013 13:31
Quote: "
BatVink wrote: Am I going mad or have I pushed AppGameKit over the edge?
Markus wrote: there is a parameter limit of 9 i believe without compiler error..."


This is one of those age-old AppGameKit TIER 1 compiler flaws.

For more information, refer to:
Issue #39 (first reported in 2011)
Issue #536

Ancient Lady has a good comment about the issue in 536, and Paul has also commented the following:

Quote: "The limit on the number of parameters is 9 and I'm told is "very difficult" to increase so we won't be doing that any time soon. We are aware that the compiler needs attention. "


Interestingly, the issue has been marked as "WontFix"... (Effin' ridiculous.)

Cheers,
AgentSam - The grumpy old software engineer

Login to post a reply

Server time is: 2024-05-09 08:23:49
Your offset time is: 2024-05-09 08:23:49