In camera.lua
Code: Select all
local proc = getProc();
local memerrmsg = "Failed to read memory";
self.XUVec = debugAssert(memoryReadFloat(proc, self.Address + camXUVec_offset), memerrmsg);
self.YUVec = debugAssert(memoryReadFloat(proc, self.Address + camYUVec_offset), memerrmsg);
self.ZUVec = debugAssert(memoryReadFloat(proc, self.Address + camZUVec_offset), memerrmsg);
.
Code: Select all
if(settings.options.DEBUGGING == nil ) then settings.options.DEBUGGING = false; end;
function debugAssert(args)
if( settings.options.DEBUGGING ) then
if( not args ) then
error("Error in memory reading", 2);
else
return args;
end
else
return args;
end
end
I think I will add debug options to my InputOutput class but not like this.^^ (hm I still wonder if I should use Lisa's logger?)