Hi all, I was wondering if there was any way to read from a string and use that string in a part of a variable.
Heres the basic code using 'skill' as an example:
procedure SkillInfoz(ID: byte; skillz: string);
begin
writeconsole(ID,'Your skill '+skillz+' is at level '+inttostr(players[ID].+skillz+)+' !',CYellow);
end;
function OnPlayerCommand(ID: byte; text: string): boolean;
begin
if (getpiece(text,' ',0) = '/skill') AND (getpiece(text,' ',1) <> nil) then SkillInfoz(ID,GetPiece(Text, ' ', 1));
end;
I thought that maybe using the +'s like you do with a string would work, but it doesn't.
Any ideas?
Thanks.