[Ajuda] 4 Erros
#3

Quote:
Originally Posted by Malandrin
View Post
Testa e me diz os erros que continuaram...

PHP Code:

// This is a comment 
// uncomment the line below if you want to write a filterscript 
//#define FILTERSCRIPT 
#include <a_samp> 
#define winner_money 10000 
new Float:CheckPoints[1][3] = 

    {
956.1308,-969.3929,38.4609
}; 
new 
    
Player_CheckPoint[MAX_PLAYERS],
    
bool:IsRaceRunning,
    
WinnerName[MAX_PLAYER_NAME],
    
stringwin[64]; 
public 
OnGameModeInit() 

    for(new 
0MAX_PLAYERSi++) 
    { 
        
Player_CheckPoint[i] = 0
        
SetPlayerRaceCheckpoint(i0CheckPoints[0][0], CheckPoints[0][1], CheckPoints[0][2], 0009.7); // No 0,0,0 vocк deverб colocar a cordenada do prуximo CP
        
IsRaceRunning true
    } 
    return 
1

public 
OnPlayerEnterRaceCheckpoint(playerid

    if(
IsRaceRunning == truePlayer_CheckPoint[playerid]++; 
     
    if(
Player_CheckPoint[playerid] == && IsRaceRunning == true
    { 
        for(new 
0MAX_PLAYERSi++) 
        { 
            
DisablePlayerRaceCheckpoint(i); 
        } 
        
GetPlayerName(playerid,WinnerName,sizeof(WinnerName)); 
        
format(stringwinsizeof(stringwin), "[RACE] The race is over, %s has won and achieved $%d!"WinnerNamewinner_money); 
        
SendClientMessageToAll(0xFF0000FFstringwin); 
        
GivePlayerMoney(playeridwinner_money); 
        
IsRaceRunning false
        return 
1
    } 
    return 
1

PHP Code:
case 2

    
SendRconCommand("reloadfs corrida");

case 
3

    
//....   

Nгo teve erro nenhum,mas a corrida nгo funcionou,creio que seja por que nгo й um filterscript e sim um mуdulo.
Depois que eu testei e a corrida nгo deu,eu deixei como mуdulo mesmo e continuaram os erros,mas sem os warnings:
Code:
..\scriptfiles\Corridas\corrida.pwn(20) : error 029: invalid expression, assumed zero
..\scriptfiles\Corridas\corrida.pwn(21) : error 001: expected token: ";", but found "{"
..\scriptfiles\Corridas\corrida.pwn(31) : warning 225: unreachable code
..\scriptfiles\Corridas\corrida.pwn(31) : error 029: invalid expression, assumed zero
..\scriptfiles\Corridas\corrida.pwn(32) : error 001: expected token: ";", but found "{"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Linha dos erros
PHP Code:
public OnGameModeInit()                  //linha 20
{                                                             //linha 21
    
for(new 0MAX_PLAYERSi++) 
    {
        
Player_CheckPoint[i] = 0;
        
SetPlayerRaceCheckpoint(i0CheckPoints[0][0], CheckPoints[0][1], CheckPoints[0][2], 0009.7); // No 0,0,0 vocк deverб colocar a cordenada do prуximo CP
        
IsRaceRunning true;
    }
    return 
1;
}
public 
OnPlayerEnterRaceCheckpoint(playerid)                            //linha 31
{                                                                                            //linha 32
    
if(IsRaceRunning == truePlayer_CheckPoint[playerid]++;
    if(
Player_CheckPoint[playerid] == && IsRaceRunning == true)
    {
        for(new 
0MAX_PLAYERSi++)
        {
            
DisablePlayerRaceCheckpoint(i);
        }
        
GetPlayerName(playerid,WinnerName,sizeof(WinnerName));
        
format(stringwinsizeof(stringwin), "[RACE] The race is over, %s has won and achieved $%d!"WinnerNamewinner_money);
        
SendClientMessageToAll(0xFF0000FFstringwin);
        
GivePlayerMoney(playeridwinner_money);
        
IsRaceRunning false;
        return 
1;
    }
    return 
1;

Obrigado por ter resolvido os warnings kk
Reply


Messages In This Thread
4 Erros - by Noppet - 17.03.2019, 19:26
Re: 4 Erros - by Malandrin - 17.03.2019, 19:38
Re: 4 Erros - by Noppet - 17.03.2019, 19:59
Re: 4 Erros - by Malandrin - 17.03.2019, 20:23
Re: 4 Erros - by Noppet - 17.03.2019, 20:49
Re: 4 Erros - by Malandrin - 17.03.2019, 21:01
Re: 4 Erros - by Noppet - 17.03.2019, 21:04
Re: 4 Erros - by Malandrin - 17.03.2019, 22:06
Re: 4 Erros - by Noppet - 17.03.2019, 23:10

Forum Jump:


Users browsing this thread: 1 Guest(s)