I'm making an invite system, where if the player types "/invite <playerID>" he invites that player ID to his team. GetPiece is not being too cooperative in this, here's the code, it's quite simple:
if Text = '/invite' then begin
if GetPlayerStat(ID,'team') = 4 then begin
SayToPlayer(ID,'Invite sent to '+IDToName(GetPiece(Text, ' ', 1)));
SayToPlayer(GetPiece(Text, ' ', 1),'You have been anonymously invited to delta team.');
SayToPlayer(GetPiece(Text, ' ', 1),'Type /canijoin to join.');
end;
end;
The it has a "Type mismatch" error with the GetPiece(Text, ' ', 1) at most...
Anything you see wrong there? I'm stumped...