Log in

View Full Version : irokiplugin



bg5
05-14-2012, 06:43 PM
I'm working now on leo random ,and I wanted to use irokiplugin.

In my script I have (what I copied from old version):
typ := Leo_AnalyzeGraveStone2(ExportImageTarget);
,but I'm not sure I use it right. I'm getting acces violation on this line ,and error log file is created:

Program exception!
Stacktrace:

Exception class: EAccessViolation
Message: Access violation
$00668895
Simba Version: 990

Brandon
05-14-2012, 07:30 PM
Well AFAIK none of the SRL functions use this :S

But if I had to take a wild guess I'd probably start off with the IOManager like:


Function dgsdgas: Boolean;
var
X: TClient;
begin
X:= GetTClient;
X.IOManager.ActivateClient;
X.IOManager.ExportImageTarget; //This will crash your Simba.. Dunno why YET.
end;


And the Exporting you want is actually declared here:

https://github.com/MerlijnWajer/Simba/blob/master/Units/MMLCore/iomanager.pas

As:

function TIOManager_Abstract.ExportImageTarget: TTarget_Exported;
begin
FillChar(result,sizeof(TTarget_Exported),0);
with result do
begin
Target:= image;
GetTargetDimensions:= @TTarget_Exported_GetTargetDimensions;
GetTargetPosition := @TTarget_Exported_GetTargetPosition;
GetColor:= @TTarget_Exported_GetColor;
ReturnData := @TTarget_Exported_ReturnData;
FreeReturnData:= @TTarget_Exported_FreeReturnData;
end;
end;