Portal SAMP
[Ajuda] expected token - Versão de Impressão

+- Portal SAMP (https://portalsamp.com)
+-- Fórum: SA-MP (https://portalsamp.com/forumdisplay.php?fid=5)
+--- Fórum: Área de suporte (https://portalsamp.com/forumdisplay.php?fid=6)
+--- Tópico: [Ajuda] expected token (/showthread.php?tid=4089)



expected token - L10motos - 17/10/2023

Citar:C:\Users\neuza\Downloads\SA92\gamemodes\1992.pwn(24751) : warning 211: possibly unintended assignment
C:\Users\neuza\Downloads\SA92\gamemodes\1992.pwn(24751) : error 029: invalid expression, assumed zero
C:\Users\neuza\Downloads\SA92\gamemodes\1992.pwn(24751) : warning 215: expression has no effect
C:\Users\neuza\Downloads\SA92\gamemodes\1992.pwn(24751) : error 001: expected token: ";", but found ")"
C:\Users\neuza\Downloads\SA92\gamemodes\1992.pwn(24751) : error 029: invalid expression, assumed zero
C:\Users\neuza\Downloads\SA92\gamemodes\1992.pwn(24751) : fatal error 107: too many error messages on one line

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


4 Errors.
Código PHP:
                    new location[MAX_ZONE_NAME];
                    GetPlayer2DZoneEx(ilocationMAX_ZONE_NAME);
                    if(PlayerInfo[i][pTimerRobATM] => 1000format(stringsizeof(string), "{0000FF}%s\t(%s)\n"locationTeamName(gTeam[i])); //erro nessa linha
                    else format(stringsizeof(string), "{FFFFFF}%s\t(%s)\n"locationTeamName(gTeam[i]));
                    strcat(megastringstring); 



RE: expected token - pushline - 17/10/2023

mude de => pra >= no if
Código:
if(PlayerInfo[i][pTimerRobATM] >= 1000)



RE: expected token - Cifra Modder - 18/10/2023

(17/10/2023 19:33)L10motos Escreveu:
Citar:C:\Users\neuza\Downloads\SA92\gamemodes\1992.pwn(24751) : warning 211: possibly unintended assignment
C:\Users\neuza\Downloads\SA92\gamemodes\1992.pwn(24751) : error 029: invalid expression, assumed zero
C:\Users\neuza\Downloads\SA92\gamemodes\1992.pwn(24751) : warning 215: expression has no effect
C:\Users\neuza\Downloads\SA92\gamemodes\1992.pwn(24751) : error 001: expected token: ";", but found ")"
C:\Users\neuza\Downloads\SA92\gamemodes\1992.pwn(24751) : error 029: invalid expression, assumed zero
C:\Users\neuza\Downloads\SA92\gamemodes\1992.pwn(24751) : fatal error 107: too many error messages on one line

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


4 Errors.
Código PHP:
                    new location[MAX_ZONE_NAME];
                    GetPlayer2DZoneEx(ilocationMAX_ZONE_NAME);
                    if(PlayerInfo[i][pTimerRobATM] => 1000format(stringsizeof(string), "{0000FF}%s\t(%s)\n"locationTeamName(gTeam[i])); //erro nessa linha
                    else format(stringsizeof(string), "{FFFFFF}%s\t(%s)\n"locationTeamName(gTeam[i]));
                    strcat(megastringstring); 

Explique mais sobre script, qual a lógica que você está tentando fazer.

Pelo que eu entendi:
Código:
new location[MAX_ZONE_NAME];
GetPlayer2DZoneEx(i, location, MAX_ZONE_NAME);

    if(PlayerInfo[i][pTimerRobATM] > 1000)
    {
        format(string, sizeof(string), "{0000FF}%s\t(%s)\n", location, TeamName(gTeam[i])); //erro nessa linha
        return 1;
    }
    else
    {
        format(string, sizeof(string), "{FFFFFF}%s\t(%s)\n", location, TeamName(gTeam[i]));
        strcat(megastring, string);
    }



RE: expected token - White_Blue - 18/10/2023

=> é um operador inexistente na linguagem Pawn.

Operadores de comparação disponíveis na linguagem Pawn:
>= - Maior ou igual
> - Maior
< - Menor
<= - Menor ou igual
== - Igual
!= - Diferente