HTTP Object Question
by Matt "Mr. Pig" Razza · in Torque Game Engine · 10/01/2006 (4:17 pm) · 3 replies
I've been using the HTTP Object for a while now and wanted to make a way so that it deletes itself when it reads the last line from the file. The problem is that when it attempts to delete itself it crashes. (The game that is). Then I added a schedule call so that it deletes itself 10 seconds after the last packet (so that it can exit the function - and so that if for some reason I needed to use the same object in those 10 seconds I could). That worked fine as well.
However, now it's crashing. It was working fine before - now it doesn't. I know the schedule idea was "bad coding" but do you have any other ideas?
Debugger output:
However, now it's crashing. It was working fine before - now it doesn't. I know the schedule idea was "bad coding" but do you have any other ideas?
if (%data $= "[EoF])
{
%this.sID = schedule(10000, 0, %this.simObject.removeObject(%this.callbackNumber)); //Mark for deletion
return;
}Debugger output:
First-chance exception at 0x00a4b354 in HE-Windows_DEBUG.exe: 0xC0000005: Access violation reading location 0xcecececa. Unhandled exception at 0x00a4b354 in HE-Windows_DEBUG.exe: 0xC0000005: Access violation reading location 0xcecececa.
About the author
Associate Orion Elenzil
Real Life Plus
eg
function myHTTPRequestObject::onDisconnect(%this) { echo("http request object finished:" SPC %this); %this.delete(); }