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):
case cEFFECT_SCALE
debugWrite(" Adding Scale Template " + str(iTemplate) + " Group " + str(iGroup) + " Object " + str(iObject))
EffectAddScale(iGroup,iObject,arrEffectTemplate[iTemplate].duration,iDelay,arrEffectTemplate[iTemplate].relative, _
arrEffectTemplate[iTemplate].p1, arrEffectTemplate[iTemplate].p2,_
arrEffectTemplate[iTemplate].p3, arrEffectTemplate[iTemplate].p4,_
arrEffectTemplate[iTemplate].p5, arrEffectTemplate[iTemplate].p6,_
arrEffectTemplate[iTemplate].progression, arrEffectTemplate[iTemplate].count)
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:
function effectAddScale(iGroup,iObject,duration,delay,iRelative,oldx#,oldy#,_
oldz#,newx#,newy#,newz#,iProgression,iRepeat)
remstart
@C This function adds an effect to the effects array
remend
debugWrite(" Group = " + str(iGroup) + " Object = " + str(iObject))
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