Sorry for the vagueness; I was pressed for time last night. It would be difficult to post the source code, as it is broken into several includes, but the relevant lines of code are:


Code:
//debugvars[] is an array of variables to send through
//my debug_display function using digits(). 
//That part works fine.

function myfunc(ENTITY* obj)//obj is used in the functions that are currently disabled
{
var zmot;
debugvars[11]=zmot;

while (1)
 {
 //functions that set and respond to zmot, 
 //currently commented out
 debugvars[11]=zmot;
 error("step break");
 wait(1);
 }

}



again, the variable does initialize to 0, but after several steps unexpectedly jumps to 94700, or a close number. Most often it is 94700.

NOTE: this is not the actual code, just a selection of relevant lines in a similar format (the variable is defined in a function). The function is called once when a script that creates an entity loads:

Code:
function init_ent()
{
myobj=ent_create(blah, blah, blah,parameters,not the issue, entity is fine);
myfunc(myobj);

}



Last edited by deianthropus; 10/05/10 16:25.