[Ajuda] Preciso de um help com esse comando
#1

CMD(playerid,params[])
{
new string[128];
new dialog[500];
for(new x;x<MAX_OSLOTS;x++)
{
if(PlayerData[playerid][pDonator] != 0)
if(IsPlayerAttachedObjectSlotUsed(playerid, x))
{ format(string, sizeof(string), ""COL_WHITE"Slot:%d :: "COL_GREEN"Used Slot\n", x); }
else format(string, sizeof(string), ""COL_WHITE"Slot:%d\n", x);
strcat(dialog,string);
}
ShowPlayerDialog(playerid, DIALOG_ATTACH_INDEX_SELECTION, DIALOG_STYLE_LIST,"Player Objects/Attachment: (Select Slot)", dialog, "Select", "Close(X)");
return 1;
}

Esse e um sistema de acessorios, eu gostaria de fazer ele acessivel apenas para donators entao coloquei a minha variavel de donator ali, que no caso é essa if(PlayerData[playerid][pDonator] != 0), mas quando tento compilar da o seguinte erro

C:\Users\41651\Desktop\GMS\Nova pasta\pawno\acessory.pwn(389) : error 017: undefined symbol "PlayerData"
C:\Users\41651\Desktop\GMS\Nova pasta\pawno\acessory.pwn(389) : warning 215: expression has no effect
C:\Users\41651\Desktop\GMS\Nova pasta\pawno\acessory.pwn(389) : error 001: expected token: ";", but found "]"
C:\Users\41651\Desktop\GMS\Nova pasta\pawno\acessory.pwn(389) : error 029: invalid expression, assumed zero
C:\Users\41651\Desktop\GMS\Nova pasta\pawno\acessory.pwn(389) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply
#2

Antes de tentar copiar cуdigo, tente ao menos perceber o que estб a copiar. E tambйm perceber um pouco de inglкs tambйm ajudava.
Reply
#3

PHP код:
CMD:comando(playerid,params[])
{
    new 
string[128];
    new 
dialog[500];
    for(new 
x;x<MAX_OSLOTS;x++)
    {
        if(
PlayerData[playerid][pDonator] <= 0) return SendClientMessage(playerid, -"Mensagem que nгo tem permissгo"); //Verifique se й PlayerData mesmo
        
if(IsPlayerAttachedObjectSlotUsed(playeridx))
        {
            
format(stringsizeof(string), ""COL_WHITE"Slot:%d :: "COL_GREEN"Used Slot\n"x); }
            else 
format(stringsizeof(string), ""COL_WHITE"Slot:%d\n"x);
            
strcat(dialog,string);
        }
        
    
ShowPlayerDialog(playeridDIALOG_ATTACH_INDEX_SELECTIONDIALOG_STYLE_LIST,"Player Objects/Attachment: (Select Slot)"dialog"Select""Close(X)");
    return 
1;

Tenta ai.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)