I have been trying to track down a bug in my code but so far have drawn a blank.
The following code will crash back to the IDE with no error and debug on.
If I create an .exe it will crash with the error 'Stack OverFlow!'
Changing to line pick to this removes the problem.
I assumed I was either making one of the following errors,
1) parenting the entity to itself
2) parenting the entity to one of its children
I checked for both but this was not the case, although the problem has gone away by adding 1 to the LinePick Y coord I really would like to know what was causing it =/
The following code will crash back to the IDE with no error and debug on.
If LinePick(EntityX(o\colmesh%,True),EntityY(o\colmesh%,True),EntityZ(o\colmesh%,True),0,o\height#,0,1)>0 EntityParent o\colmesh%,PickedEntity() Else MoveEntity o\colmesh%,0,-0.5,0 EndIf
If I create an .exe it will crash with the error 'Stack OverFlow!'
Changing to line pick to this removes the problem.
If LinePick(EntityX(o\colmesh%,True),EntityY(o\colmesh%,True)+1,EntityZ(o\colmesh%,True),0,o\height#,0,1)>0 EntityParent o\colmesh%,PickedEntity() Else MoveEntity o\colmesh%,0,-0.5,0 EndIf
I assumed I was either making one of the following errors,
1) parenting the entity to itself
2) parenting the entity to one of its children
I checked for both but this was not the case, although the problem has gone away by adding 1 to the LinePick Y coord I really would like to know what was causing it =/