0 Members and 1 Guest are viewing this topic.
writeln(format('My name is: %s',[getplayerstat(id,'name')]);
writeln('My name is: ' + getplayerstat(id, 'name'));
Falcon is the one who works on the ScriptCore so he knows it I think for you string format example you can use normal string concatenation:Code: [Select]writeln('My name is: ' + getplayerstat(id, 'name'));You can ofc write your own format function which parses the format string.
function format(const text: string; const data: array of variant): string;var s, q: integer;beginresult := '';for s := 1 to length(text) do if copy(text,s,1) = '%' then begin q := strtoint(copy(text,s+1,1)); case vartype(data[q]) of 3: result := result + inttostr(data[q]); 256: result := result + data[q]; end; end else if copy(text,s-1,1) <> '%' then result := result + copy(text,s,1);end;