[Ajuda] ERROS AO COMPILAR FilterScript
#1

PHP код:
C:\Users\Pc\Desktop\carregar.pwn(82) : error 012invalid function callnot a valid address
C
:\Users\Pc\Desktop\carregar.pwn(82) : warning 215expression has no effect
C
:\Users\Pc\Desktop\carregar.pwn(82) : error 001expected token";"but found ")"
C:\Users\Pc\Desktop\carregar.pwn(82) : error 029invalid expressionassumed zero
C
:\Users\Pc\Desktop\carregar.pwn(82) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
4 Errors



Linha:

Код HTML:
        format(playerFileFormatted, 62, PLAYER_FILE, GetPlayerNameEx(playerid));
Reply
#2

PHP код:
        format(playerFileFormatted62PLAYER_FILEGetPlayerNameEx(playerid);); 
Reply
#3

erro continuou..
Reply
#4

Код:
format(playerFileFormatted, 62, PLAYER_FILE, GetPlayerNameEx[playerid]);
Reply
#5

Agora o erro й:

error 001: expected token: ";", but found "]"
Reply
#6

Poste se quiser o code completo, o erro pode ser em cima ou em baixo
Reply
#7

PHP код:
#include <a_samp>
#include <DOF2>
#include <ZCMD>
/*-------------------------------------------------------------------------------------------------------------------------------
|                                                Configuraзхes                                                                  |
|             - PLAYER_FILE                                                                                                     |
|                   Definiзгo utilizada para obter o caminho do arquivo.                                                        |
|                   Caso deixar padrгo, й necessбrio a pasta Spawn dentro da scriptfiles.                                       |
|                                                                                                                               |
|             - SPAWN_MODE                                                                                                      |
|                   Caso o modo de spawn seja 1 o jogador serб forзado a ser levado a ъltima posiзгo salva assim                |
|                   que ele der spawn pela primeira vez.                                                                        |
|                                                                                                                               |
|                   Caso seja 2, o jogador tem um certo tempo para poder decidir se quer continuar na ъltima posi-              |
|                   згo salva. (O tempo й configuravel)                                                                         |
|                                                                                                                               |
|                   Caso seja 3, um dialog sera mostrado ao jogador para que ele escolha se quer continuar da ъl-               |
|                   tima posiзгo salva ou continuar no local em que spawnou.                                                    |
|                                                                                                                               |
|             - SPAWN_TIME                                                                                                      |
|                   Tempo em segundos, em que o jogador deverб escolher se quer voltar а ъltima posiзгo salva, ou               |
|                   continuar aonde estб.                                                                                       |
|                                                                                                                               |
|                   O SPAWN_TIME sу й utilizado caso SPAWN_MODE seja 2.                                                         |
|                                                                                                                               |
|             - SPAWN_COMMAND_STYLE                                                                                             |
|                   Caso SPAWN_MODE seja 2, e SPAWN_COMMAND_STYLE seja 1, o jogador deverб apertar Y para continu-              |
|                   continuar da ъtima posiзгo salva.                                                                           |
|                                                                                                                               |
|                   Caso SPAWN_COMMAND_STYLE seja 2, o jogador deverб apertar digitar o comando para continuar da               |
|                   ъtima posiзгo salva.                                                                                        |
|                                                                                                                               |
|             - SPAWN_COMMAND                                                                                                   |
|                   Comando utilizado para continuar do ъltima posiзгo salva.                                                   |
|                                                                                                                               |
|                   O SPAWN_COMMAND sу й utilizado caso SPAWN_MODE seja 2.                                                      |
|                                                                                                                               |
|             - SPAWN_DIALOG                                                                                                    |
|                   ID do dialog que vai ser utilizado.                                                                         |
|                                                                                                                               |
--------------------------------------------------------------------------------------------------------------------------------*/
#define     PLAYER_FILE             "Spawn/%s.ini"
#define     SPAWN_MODE              3
#define     SPAWN_TIME              20//utilize em segundos, no caso 10 = 10 segundos.
#define     SPAWN_COMMAND_STYLE     2
#define     SPAWN_DIALOG            1380
#if SPAWN_MODE == 2
new
    
timeCheck[MAX_PLAYERS],
    
timerCheckSpawn[MAX_PLAYERS],
    
boolspawningPlayer[MAX_PLAYERS];
#endif
new
    
boolplayerConnected[MAX_PLAYERS];
forward CheckSpawnPos(playerid);
forward CheckSpawnPosTime(playerid);
public 
OnFilterScriptExit()
{
    
DOF2_Exit();
    return 
1;
}
public 
OnPlayerConnect(playerid)
{
    
playerConnected[playerid]= true;
    return 
1;
}
public 
OnPlayerSpawn(playerid)
{
    if(
playerConnected[playerid])
    {
        new
            
playerFileFormatted[62];
        
format(playerFileFormatted62PLAYER_FILEGetPlayerNameEx(playerid));
        if(!
DOF2_FileExists(playerFileFormatted))
            return 
DOF2_CreateFile(playerFileFormatted);
        
#if SPAWN_MODE == 1
            
return SetTimerEx("CheckSpawnPos"500false"i"playerid);
        
#elseif SPAWN_MODE == 2
            
timerCheckSpawn[playerid] = SetTimerEx("CheckSpawnPosTime"1000true"i"playerid);
            
spawningPlayer[playerid] = true;
            return 
1;
        
#elseif SPAWN_MODE == 3
            
ShowDialog(playeridSPAWN_DIALOG);
        
#endif
        
playerConnected[playerid] = false;
    }
    return 
1;
}
#if SPAWN_MODE == 2
    #if SPAWN_COMMAND_STYLE == 1
    
public OnPlayerKeyStateChange(playeridnewkeysoldkeys) {
        if ((
newkeys KEY_YES) && !(oldkeys KEY_YES))
            if(
spawningPlayer[playerid]) {
                
BreakLine(playerid);
                
SendClientMessage(playerid0x6491FFFF"| LSpawn | {FFFFFF}Enviado а ъltima posiзгo salva.");
                
KillTimer(timerCheckSpawn[playerid]);
                
spawningPlayer[playerid] = false;
                return 
CheckSpawnPos(playerid);
            }
        return 
1;
    }
    
#endif
#elseif SPAWN_MODE == 3
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    switch(
dialogid)
    {
        case 
SPAWN_DIALOG:
        {
            if(!
response)
                return 
1;
            
SendClientMessage(playerid0x6491FFFF"| LSpawn | {FFFFFF}Enviado а ъltima posiзгo salva.");
            
CheckSpawnPos(playerid);
            return 
1;
        }
    }
    return 
0;
}
#endif
public OnPlayerDisconnect(playerid)
{
    new
        
Floatflo_player_pos[3],
        
Floatflo_player_fa,
        
int_player_int GetPlayerInterior(playerid),
        
playerFileFormatted[62];
    
GetPlayerPos(playeridflo_player_pos[0], flo_player_pos[1], flo_player_pos[2]);
    
GetPlayerFacingAngle(playeridflo_player_fa);
    
format(playerFileFormatted62PLAYER_FILEGetPlayerNameEx(playerid));
    if(!
DOF2_FileExists(playerFileFormatted))
        
DOF2_CreateFile(playerFileFormatted);
    
DOF2_SetFloat(playerFileFormatted"Last Pos X"flo_player_pos[0]);
    
DOF2_SetFloat(playerFileFormatted"Last Pos Y"flo_player_pos[1]);
    
DOF2_SetFloat(playerFileFormatted"Last Pos Z"flo_player_pos[2]);
    
DOF2_SetFloat(playerFileFormatted"Last Pos FA"flo_player_fa);
    
DOF2_SetInt(playerFileFormatted"Last Int"int_player_int);
    
DOF2_SaveFile();
    return 
1;
}
public 
CheckSpawnPos(playerid)
{
    new
        
FloatoldPlayerPos[3],
        
FloatoldPlayerPosFA,
        
oldPlayerPosInt,
        
playerFileFormatted[62];
    
playerConnected[playerid] = false;
    
format(playerFileFormatted62PLAYER_FILEGetPlayerNameEx(playerid));
    
oldPlayerPos[0] = DOF2_GetFloat(playerFileFormatted"Last Pos X");
    
oldPlayerPos[1] = DOF2_GetFloat(playerFileFormatted"Last Pos Y");
    
oldPlayerPos[2] = DOF2_GetFloat(playerFileFormatted"Last Pos Z");
    
oldPlayerPosFA DOF2_GetFloat(playerFileFormatted"Last Pos FA");
    
oldPlayerPosInt DOF2_GetInt(playerFileFormatted"Last Int");
    
SetPlayerPos(playeridoldPlayerPos[0], oldPlayerPos[1], oldPlayerPos[2]);
    
SetPlayerFacingAngle(playeridoldPlayerPosFA);
    
SetPlayerInterior(playeridoldPlayerPosInt);
    return 
1;
}
#if SPAWN_MODE == 2
public CheckSpawnPosTime(playerid)
{
    
timeCheck[playerid]++;
    new 
l_string[128];
    if (
timeCheck[playerid] == 1)
    {
        
#if SPAWN_COMMAND_STYLE == 1
            
format(stringsizeof string"| LSpawn | {FFFFFF}Vocк tem {64DCFF}%d {FFFFFF}segundos para apertar a tecla {64DCFF}Y {FFFFFF}e continuar aonde"SPAWN_TIME);
            
SendClientMessage(playerid0x6491FFFFstring);
            
SendClientMessage(playerid0x6491FFFF"| LSpawn | {FFFFFF}estava quando se desconectou do servidor pela ъltima vez.");
        
#elseif SPAWN_COMMAND_STYLE == 2
            
format(stringsizeof string"| LSpawn | {FFFFFF}Vocк tem {64DCFF}%d {FFFFFF}segundos para digitar o comando {64DCFF}/continuar {FFFFFF}e continuar aonde"SPAWN_TIME);
            
SendClientMessage(playerid0x6491FFFFstring);
            
SendClientMessage(playerid0x6491FFFF"| LSpawn | {FFFFFF}estava quando se desconectou do servidor pela ъltima vez.");
        
#endif
    
}
    else if (
timeCheck[playerid] == SPAWN_TIME/2)
    {
        
#if SPAWN_COMMAND_STYLE == 1
            
BreakLine(playerid);
            
format(stringsizeof string"| LSpawn | {FFFFFF}Vocк tem {64DCFF}%d {FFFFFF}segundos para apertar a tecla {64DCFF}Y {FFFFFF}e continuar aonde"SPAWN_TIME/2);
            
SendClientMessage(playerid0x6491FFFFstring);
            
SendClientMessage(playerid0x6491FFFF"| LSpawn | {FFFFFF}estava quando se desconectou do servidor pela ъltima vez.");
        
#elseif SPAWN_COMMAND_STYLE == 2
            
BreakLine(playerid);
            
format(stringsizeof string"| LSpawn | {FFFFFF}Vocк tem {64DCFF}%d {FFFFFF}segundos para digitar o comando {64DCFF}/continuar {FFFFFF}e continuar aonde"SPAWN_TIME/2);
            
SendClientMessage(playerid0x6491FFFFstring);
            
SendClientMessage(playerid0x6491FFFF"| LSpawn | {FFFFFF}estava quando se desconectou do servidor pela ъltima vez.");
        
#endif
    
}
    else if (
timeCheck[playerid] == SPAWN_TIME)
    {
        
BreakLine(playerid);
        
SendClientMessage(playerid0x6491FFFF"| LSpawn | {FFFFFF}O tempo acabou e vocк vai continuar aonde estб.");
        
timeCheck[playerid] = 0;
        
spawningPlayer[playerid] = false;
        
KillTimer(timerCheckSpawn[playerid]);
        return 
1;
    }
    return 
1;
}
#endif
#if SPAWN_MODE == 2
    #if SPAWN_COMMAND_STYLE == 2
        
CMD:continuar(playeridparams[], help)
        {
            if(!
spawningPlayer[playerid])
                return 
0;
            
BreakLine(playerid);
            
SendClientMessage(playerid0x6491FFFF"| LSpawn | {FFFFFF}Enviado а ъltima posiзгo salva.");
            
KillTimer(timerCheckSpawn[playerid]);
            
spawningPlayer[playerid] = false;
            return 
CheckSpawnPos(playerid);
        }
    
#endif
#elseif SPAWN_MODE == 3
ShowDialog(playeriddialogid)
{
    switch(
dialogid)
    {
        case 
SPAWN_DIALOG:
        {
            new
                
formatMsg[128];
            
BreakLine(playerid);
            
format(formatMsgsizeof formatMsg"{FFFFFF}Olб {64DCFF}%s{FFFFFF}, gostaria de continuar de onde vocк parou na sua ъltima sessгo?"GetPlayerNameEx(playerid));
            
ShowPlayerDialog(playeriddialogidDIALOG_STYLE_MSGBOX"Spawn..."formatMsg"Sim""Nгo");
            return 
1;
        }
    }
    return 
1;
}
#endif
GetPlayerNameEx(playerid)
{
    new
        
playerName[MAX_PLAYER_NAME];
    
GetPlayerName(playeridplayerNameMAX_PLAYER_NAME);
    return 
playerName;
}
BreakLine(playerid) {
    return 
SendClientMessage(playerid, -1" ");

Esse й ele inteiro, porйm no lugar de estar definido o spawm_mode 3, eu defini o SPAWM_MODE 2
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)