[Ajuda] Erro desconhecido
#1

Код:
2\Desktop\gamemode\gamemodes\BUL.pwn(37176) : error 006: must be assigned to an array
C:\Users\2\Desktop\gamemode\gamemodes\BUL.pwn(37182) : error 035: argument type mismatch (argument 1)
C:\Users\2\Desktop\gamemode\gamemodes\BUL.pwn(37186) : error 006: must be assigned to an array
C:\Users\2\Desktop\gamemode\gamemodes\BUL.pwn(37187) : error 006: must be assigned to an array
C:\Users\2\Desktop\gamemode\gamemodes\BUL.pwn(37187) : warning 204: symbol is assigned a value that is never used: "Material"
PHP код:
    if (strcmp(cmd"/materialorg"true) == 0)
    {
        new 
orgMaterial;
        
org strtok(cmdtextidx); //1 erro aqui
        
Material strval(tmp);
        if (!
strlen(tmp))
        {
            return 
SendClientMessage(playeridCOLOR_WHITE"USE: /materialorg [Organizaзгo] [Quantia]");
        }
        if (!
strlen(Material)) //1 erro aqui
        
{
            return 
SendClientMessage(playeridCOLOR_WHITE"USE: /materialorg [Organizaзгo] [Quantia]");
        }
        
org strtok(cmdtextidx); //1 erro aqui
        
Material strtok(cmdtextidx); //2 erro aqui
        
if (PlayerInfo[playerid][pAdmin] >= 5)
        {
                    if (
PlayerInfo[playerid][pAdminStats] != && PlayerInfo[playerid][pAdmin] <= 5)
                    {
                        
SendClientMessage(playeridCOLOR_GRAD1"ERRO: Vocк nгo estб no modo admin! (/trabalhar)");
                        return 
true;
                    }
                    
DepositarMaterialOrg(orgMaterial);
                    
format(stringsizeof(string), "Vocк depositou %d de materias no\ncofre da organizaзгo id %d"Materialorg);
                    
ShowPlayerDialog(playeridDIALOG0DIALOG_STYLE_MSGBOX"Materiais"string"Fechar""");
        }
        else
        {
            
SendClientMessage(playeridCOLOR_GRAD1"ERRO: Vocк nгo tem nнvel administrativo suficiente.");
        }
        return 
true;
    } 
Estou tentando fazer um comando de depositar dinheiro na org, serб que alguem pode me ajudar resolver? nгo estou entendendo nada ali.. fiz e refiz
Reply
#2

Up! alguem... ae
Reply
#3

Com zcmd й muito mais fбcil, amigo.
PHP код:
commnand(depositarplayeridparams[]) {
    new 
        
organizacao[56], 
        
material
    
;
    if(
sscanf(params"s[56], d"organizacaomaterial)) return SendClientMessage(playerid, -1"ERRO!");
    
DepositarMaterialOrg(organizacaomaterial);
    return 
1;

Reply
#4

Adicionou isto no final?

PHP код:
strtok(const string[], &index)
{
    new 
length strlen(string);
    while ((
index length) && (string[index] <= ' '))
    {
        
index++;
    }
 
    new 
offset index;
    new 
result[20];
    while ((
index length) && (string[index] > ' ') && ((index offset) < (sizeof(result) - 1)))
    {
        
result[index offset] = string[index];
        
index++;
    }
    
result[index offset] = EOS;
    return 
result;

Ah, te recomendo usar YCMD/ZCMD juntamente com SSCANF. Strtok й ultrapassada.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)