I tried to implement Angelscript in Delphi.
Therefore i wrote this struct-equivalent of asSMessageInfo:
type
pasSMessageInfo = ^asSMessageInfo;
asSMessageInfo = packed record
sec: pchar;
row: integer;
col: integer;
kind: integer;
msg: pchar;
end;
asEngine_SetMessageCallback(angel_engine,@AngelScriptMessageCB,nil,asCALL_CDECL);
with
procedure AngelScriptMessageCB( const mi: pasSMessageInfo; p: pointer );cdecl;
begin
Writeln(format('AS:%s<%s>(%d,%d)\n',[mi^.msg,mi^.sec,mi^.row,mi^.col]));
end;
but the output just shows eg AS:??????????<?????????????>(0,0)
Did i do anything wrong while converting the asSMessageInfo struct?