[AJUDA] Ajeitar GM
#1

Galera tava fazendo esse gm, e comзei a pegar parte de um outro e me enrrolei um pouco e ficou com esses erros e warning

erros e war:

PHP код:
C:\Users\Antonio\samp host\filterscripts\Mala.pwn(35) : warning 217loose indentation
C
:\Users\Antonio\samp host\filterscripts\Mala.pwn(21) : warning 204symbol is assigned a value that is never used"string"
C:\Users\Antonio\samp host\filterscripts\Mala.pwn(21 -- 38) : error 010invalid function or declaration
C
:\Users\Antonio\samp host\filterscripts\Mala.pwn(21 -- 40) : error 010invalid function or declaration
C
:\Users\Antonio\samp host\filterscripts\Mala.pwn(21 -- 43) : error 010invalid function or declaration
C
:\Users\Antonio\samp host\filterscripts\Mala.pwn(21 -- 43) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
4 Errors

Linhas:

PHP код:
#include <a_samp>
main()
{
    print(
"\n----------------------------------");
    print(
" Teste Mala");
    print(
"----------------------------------\n");
}
public 
OnGameModeInit()
{
    
// Don't use these lines if it's a filterscript
    
SetGameModeText("Blank Script");
    
AddPlayerClass(01958.37831343.157215.3746269.1425000000);
    return 
1;
}
public 
OnPlayerCommandText(playeridcmdtext[])
{
        new 
string[256];
        new 
cmd[256];
        new 
idx;
        
cmd strtok(cmdtextidx);
//==================================[mala]=====================================
        
if(strcmp(cmdtext"/comprarmala"true) == 0)
        {
               if(
IsPlayerConnected(playerid))
            {
                if(
GetPlayerMoney(playerid)<2000)return SendClientMessage(playerid0xFFFFFFFF,"Vocк nгo tem R$1000!");
                
SetPlayerAttachedObjectplayerid0121260.1183110.0292330.0295250.000000260.2143240.0000001.0000001.0000001.000000 );
                
GivePlayerMoney(playerid, -2000);
                }
            }
            return 
1;
        }
        if(
strcmp(cmd"/darmala"true) == 0)
        {
        if(
IsPlayerConnected(playerid))
        {
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playeridCOLOR_GRAD1"USO: /darmala [playerid/Parte-do-Nick] [quantia]");
                return 
1;
            }
            
//giveplayerid = strval(tmp);
            
giveplayerid ReturnUser(tmp);
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playeridCOLOR_GRAD1"USO: /darmala [playerid/Parte-do-Nick] [quantia]");
                return 
1;
            }
            
moneys strval(tmp);
            if(
moneys || moneys 99999)
            {
                
SendClientMessage(playeridCOLOR_GRAD1"Escolha entre 1 e R$: 50000");
                return 
1;
            }
            if (
IsPlayerConnected(giveplayerid))
            {
                if(
giveplayerid != INVALID_PLAYER_ID)
                {
                    if(
PlayerInfo[giveplayerid][pLocal] == 106)
                    {
                        
SendClientMessage(playeridCOLOR_GRAD1"Este comando nгo й habilitado para se usar nesse lugar.");
                        return 
1;
                    }
                    if (
ProxDetectorS(5.0playeridgiveplayerid))
                    {
                        
GetPlayerName(giveplayeridgiveplayersizeof(giveplayer));
                        
GetPlayerName(playeridsendernamesizeof(sendername));
                        
playermoney GetPlayerMoneyEx(playerid);
                        if (
moneys && playermoney >= moneys)
                        {
                            
ConsumingMoney[giveplayerid] = 1;
                            
GivePlayerMoneyEx(playerid, (moneys));
                            
GivePlayerMoneyEx(giveplayeridmoneys);
                            
format(stringsizeof(string), "   Vocк enviou R$: %d para %s(Jogador: %d)"moneysgiveplayer,giveplayerid);
                            
PlayerPlaySound(playerid10520.00.00.0);
                            
SendClientMessage(playeridCOLOR_GRAD1string);
                            
format(stringsizeof(string), "   Vocк recebeu R$: %d de %s(Jogador: %d)."moneyssendernameplayerid);
                            
SendClientMessage(giveplayeridCOLOR_GRAD1string);
                            
format(stringsizeof(string), "%s pagou R$: %d para %s"sendernamemoneysgiveplayer);
                            
PayLog(string);
                            
PlayerPlaySound(giveplayerid10520.00.00.0);
                            
format(stringsizeof(string), "%s deu algum dinheiro para %s."sendername ,giveplayer);
                            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                        }
                        else
                        {
                            
SendClientMessage(playeridCOLOR_GRAD1"   Quantia invбlida");
                        }
                    }
                    else
                    {
                        
SendClientMessage(playeridCOLOR_GRAD1"   Vocк estб longe do persongem");
                    }
                }
//invalid id
            
}
            else
            {
                
format(stringsizeof(string), "   %d nгo й um jogador Ativo."giveplayerid);
                
SendClientMessage(playeridCOLOR_GRAD1string);
            }
        }
    return 
0;
}
stock 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;

Reply


Messages In This Thread
[AJUDA] Ajeitar GM - by atsbs - 28.11.2011, 22:05
Re : [AJUDA] Ajeitar GM - by GabrielDias_Invision - 28.11.2011, 22:27
Re: [AJUDA] Ajeitar GM - by atsbs - 28.11.2011, 22:29
Re: [AJUDA] Ajeitar GM - by ViniBorn - 28.11.2011, 22:35
Re: [AJUDA] Ajeitar GM - by atsbs - 28.11.2011, 22:42
Re: [AJUDA] Ajeitar GM - by ViniBorn - 28.11.2011, 22:45
Re: [AJUDA] Ajeitar GM - by atsbs - 28.11.2011, 22:50
Re: [AJUDA] Ajeitar GM - by ViniBorn - 28.11.2011, 23:24
Re: [AJUDA] Ajeitar GM - by atsbs - 28.11.2011, 23:35

Forum Jump:


Users browsing this thread: 1 Guest(s)