if(!strcmp(tmp, "duel", true))
{
new guards = Bodyguards[playerid];
// Check the bodyguards count for player
if(guards == 0)
{
SendClientMessage(playerid, -1, "No bodyguards to duel");
return 1;
}
// Get the guard id
tmp = strtok(cmdtext, index);
// Check params
if(!strlen(tmp))
{
SendClientMessage(playerid, -1, "Use: /bg duelmode [id]");
return 1;
}
if(strval(tmp) < 0 || strval(tmp) > guards)
{
SendClientMessage(playerid, -1, "Invalid bodyguard");
return 1;
}
// Set the bodyguard follow flag
Bodyguard[playerid][strval(tmp) - 1][duelmode] = 1;
return 1;
}
if(!strcmp(tmp, "duel", true))
{
(3020) : error 017: undefined symbol "tmp" (3020) : error 017: undefined symbol "cmdtext" (3022) : error 017: undefined symbol "tmp" (3027) : error 017: undefined symbol "tmp" (3033) : error 017: undefined symbol "tmp" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors.
CMD:duel(playerid, params[])
{
new guards = Bodyguards[playerid],bot;
if(guards == 0)
{
SendClientMessage(playerid, -1, "No hay botsitus dispuestos asddas.");
return 1;
}
if(sscanf(params, "d", bot)) return SendClientMessage(playerid, -1, "Use: /duel [id]");
if(bot < 0 || bot > guards)
{
SendClientMessage(playerid, -1, "botsitoekyzde invalido.");
return 1;
}
Bodyguard[playerid][bot][duelmode] = 1;
return 1;
}
que sera?
|
una pregunta,todo compila bien,pero cuando pongo duel id,no pasa nada
que sera? |