I don't know if maybe I'm not doing things properly, but it seems that access to Delphi is restricted? We can do IFs and whatnot, but not access anything useful, such as Delphi file access functions? I realize the Soldat API comes with ReadFile and WriteFile, but that doesn't help me deal with records, which is a much easier way to accomplish what I'm trying to do, vs having to try to parse the string returned from ReadFile.
The following doesn't work. My fault, or is the problem indeed restricted access? If so, what DO we have access to, or what is restricted? Whitelist or blacklist available?
function OnPlayerCommand(ID: Byte; Text: string): boolean;
var
curdir : string;
begin
if Text = '/test' then begin
curdir := GetCurrentDir;
WriteConsole(ID, 'Current Dir: ' + curdir, RGB(255, 0, 0));
end;
Result := false;
end;
Result:
[*] Compiling Script AdminCore.pas...
[*] [Error] (57:14): Unknown identifier 'GetCurrentDir'