08.09.2011, 23:39
well.. since ZMCD is better than STRCMP i decieded to use it!
so i have this cmd ..
and i convert it to ...
and i got these errors while compiling
so whats up with this these erros ?! what i have 2 do.
so i have this cmd ..
pawn Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[128], tmp[128], idx;
cmd = strtok(cmdtext, idx);
if(!strcmp("/glasses",cmd,true))
{
new skin = GetPlayerSkin(playerid);
tmp = strtok(cmdtext, idx);
if(!strval(tmp) || strval(tmp) > 30) return SendClientMessage(playerid, 0xFFFFFFAA, "(Error) Syntax: /glasses [1 - 30]");
new glasseid = CommonRed + (strval(tmp) - 1);
SetPlayerHoldingObject(playerid, glasseid, 2, SkinOffSet[skin][0], SkinOffSet[skin][1], SkinOffSet[skin][2], SkinOffSet[skin][3], SkinOffSet[skin][4], SkinOffSet[skin][5]);
TextDrawShowForPlayer(playerid, MsgBox);
SetTimerEx("Hide", 3500, false, "d", playerid);
return 1;
}
return 0;
}
pawn Code:
CMD:Glasses(playerid, params[])
{
new skin = GetPlayerSkin(playerid);
tmp = strtok(cmdtext, idx);
if(!strval(tmp) || strval(tmp) > 30) return SendClientMessage(playerid, 0xFFFFFFAA, "(Error) Syntax: /glasses [1 - 30]");
new glasseid = CommonRed + (strval(tmp) - 1);
SetPlayerHoldingObject(playerid, glasseid, 2, SkinOffSet[skin][0], SkinOffSet[skin][1], SkinOffSet[skin][2], SkinOffSet[skin][3], SkinOffSet[skin][4], SkinOffSet[skin][5]);
TextDrawShowForPlayer(playerid, MsgBox);
SetTimerEx("Hide", 3500, false, "d", playerid);
return 1;
}
and i got these errors while compiling
pawn Code:
C:\Lancer\my server\filterscripts\LancyFS.pwn(722) : error 017: undefined symbol "tmp"
C:\Lancer\my server\filterscripts\LancyFS.pwn(722) : error 017: undefined symbol "strtok"
C:\Lancer\my server\filterscripts\LancyFS.pwn(724) : error 017: undefined symbol "tmp"
C:\Lancer\my server\filterscripts\LancyFS.pwn(726) : error 017: undefined symbol "tmp"
so whats up with this these erros ?! what i have 2 do.