if (strcmp(cmd, "/admfuncao", true) == 0)
{
if (AccountData[playerid][pAdmin] == 3000)
{
tmp = strtok(cmdtext, idx);
if (!strlen(tmp)) return SendClientMessage(playerid, -1, "USE: /admfuncao [ID/Nome] [Funзгo]");
giveplayerid = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if (!strlen(tmp)) return SendClientMessage(playerid, -1, "USE: /admfuncao [ID/Nome] [Funзгo]");
new funcao = strval(tmp);
if (IsPlayerConnected(giveplayerid))
{
if (giveplayerid != INVALID_PLAYER_ID)
{
AccountData[playerid][pFuncao] = funcao;
}
}
}
else SendClientMessage(playerid, COLOR_GRAD1, "ERRO: Vocк nгo tem nнvel administrativo suficiente.");
return 1;
}
strmid(AccountData[playerid][pFuncao], "Administrar", 0, strlen("Administrar"), 255);
pFuncao[56]
AccountData[playerid][pFuncao] = funcao;
format(AccountData[playerid][pFuncao], 300, funcao);
|
troque
PHP Code:
PHP Code:
|
C:\Users\2\Desktop\Brasil United Life\gamemode\gamemodes\2.pwn(28773) : error 035: argument type mismatch (argument 3) C:\Users\2\Desktop\Brasil United Life\gamemode\gamemodes\2.pwn(28767) : warning 204: symbol is assigned a value that is never used: "funcao" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
if (strcmp(cmd, "/admfuncao", true) == 0)
{
if (AccountData[playerid][pAdmin] == 3000)
{
tmp = strtok(cmdtext, idx);
if (!strlen(tmp)) return SendClientMessage(playerid, -1, "USE: /admfuncao [ID/Nome] [Funзгo]");
giveplayerid = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if (!strlen(tmp)) return SendClientMessage(playerid, -1, "USE: /admfuncao [ID/Nome] [Funзгo]");
new funcao = strval(tmp); //error linha 28767
if (IsPlayerConnected(giveplayerid))
{
if (giveplayerid != INVALID_PLAYER_ID)
{
format(AccountData[playerid][pFuncao], 300, funcao); //error linha 28773
}
}
}
else SendClientMessage(playerid, COLOR_GRAD1, "ERRO: Vocк nгo tem nнvel administrativo suficiente.");
return 1;
}
format(AccountData[playerid][pFuncao], 300, "%s",funcao);
|
pawn Code:
|
|
Vdd , programar de madrugada resulta em falta de atenзгo kkk
@Edit Se precisar de alguma ajuda ou duvida pode chamar skype que fico online direto garotin1408 |
new funcao = strval(tmp);
new funcao = strrest(cmdtext,idx);
|
use isso
PHP Code:
|
C:\Users\2\Desktop\Brasil United Life\gamemode\gamemodes\2.pwn(28767) : error 017: undefined symbol "strrest"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
new funcao = strrest(cmdtext,idx);
if(strcmp(cmd, "/admfuncao", true) == 0)
{
if(AccountData[playerid][pAdmin] == 3000)
{
new plid, funcao[128];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, -1, "USE: /admfuncao [ID] [Funзгo]");
plid = strval(tmp);
funcao = strrest(cmdtext, idx);
if(!strlen(funcao)) {
SendClientMessage(playerid, -1, "USE: /admfuncao [ID] [Funзгo]");
return 1;
}
if(IsPlayerConnected(plid))
{
if(plid != INVALID_PLAYER_ID)
{
format(AccountData[plid][pFuncao], 128, "%s", funcao);
}
}
}
else SendClientMessage(playerid, COLOR_GRAD1, "ERRO: Vocк nгo tem nнvel administrativo suficiente.");
return 1;
}