I'm getting the type mismatch error somewhere in this snippet of the code I'm working on, can you help plz:
function OnCommand(ID:Byte;Text:string):boolean;
var
Temp: array[0..5] of string;
i: integer;
begin
Result:=false;
Temp[0]:=LowerCase(GetPiece(Text, ' ', 0)); //Command
Case Temp[0] of
'/recompile': begin
Recompile:= true;
end;
'/setexp','/expset': begin
Temp[1]:=GetPiece(Text, ' ', 1); //Player
Temp[2]:=GetPiece(Text, ' ', 2); //NewEXP
if Player[strtoint(Temp[1])].Active=true then begin
inc(Player[strtoint(Temp[1])].EXP,(strtoint(Temp[2])-Player[strtoint(Temp[1])].EXP));
WriteConsole(ID,'Player '+Temp[1]+'''s EXP set to '+inttostr(Player[strtoint(Temp[1])].EXP)+'.',$FF20FF20);
end else WriteConsole(ID,'Player '+Temp[1]+' is inactive.',$FFFF2020);
end;
end;
end;