SA-MP Forums Archive
[Ajuda] error: 017: undefined symbol "i" - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] error: 017: undefined symbol "i" (/showthread.php?tid=461898)



error: 017: undefined symbol "i" - lekinho911 - 04.09.2013

if(!strcmp(cmdtext, "/dominar", true))
{
if(!IsAreaInGangCheck(playerid)) SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: Vocк nгo estб em nenhuma Gang Zone,FAIL");
new Float, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
new name[MAX_PLAYER_NAME], string[44];
GetPlayerName(playerid, name, sizeof(name));
for (new i=0; i < GZS_CRIADAS; i++)
if (x > CordGZs[i][0] && y > CordGZs[i][1] && x < CordGZs[i][2] && y < CordGZs[i][3]&& z < 500) {
format(string, sizeof(string), "%s comeзou a dominar a gang zone %s.",name,NomesGZs[i]);

}
SendClientMessageToAll(0xFFFF00AA, string);
GangZoneFlashForAll(GZCriadas[i], GetPlayerColor(playerid))
SetTimer("Terminar",60000,false);
return 1;
}

COMANDO Й ESSE O ERRO Й NA LINHA

Код:
 error: 017: undefined symbol "i"



Re: error: 017: undefined symbol "i" - Biieell - 04.09.2013

PHP код:
if(!strcmp(cmdtext"/dominar"true))
{
if(!
IsAreaInGangCheck(playerid)) SendClientMessage(playerid0xFFFFFFFF"SERVER: Vocк nгo estб em nenhuma Gang Zone,FAIL");
new 
Float:xFloat:yFloat:z;
GetPlayerPos(playeridxyz);
new 
name[MAX_PLAYER_NAME], string[44];
GetPlayerName(playeridnamesizeof(name));
for (new 
i=0GZS_CRIADASi++)
if (
CordGZs[i][0] && CordGZs[i][1] && CordGZs[i][2] && CordGZs[i][3]&& 500) {
format(stringsizeof(string), "%s comeзou a dominar a gang zone %s.",name,NomesGZs[i]);
}
SendClientMessageToAll(0xFFFF00AAstring);
GangZoneFlashForAll(GZCriadas[i], GetPlayerColor(playerid)); <================== // Aqui nгo tem um ;  ?
SetTimer("Terminar",60000,false);
return 
1;

Faltou um ; ali.
Em qual linha da o erro ? '-'


Re: error: 017: undefined symbol "i" - zSuYaNw - 04.09.2013

Tente isto,

pawn Код:
if(!strcmp(cmdtext, "/dominar", true))
{
    if(!IsAreaInGangCheck(playerid)) SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: Vocк nгo estб em nenhuma Gang Zone,FAIL");

    new Float, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);

    new name[MAX_PLAYER_NAME], string[44];
    GetPlayerName(playerid, name, sizeof(name));

    for (new i=0; i < GZS_CRIADAS; i++){
        if (x > CordGZs[i][0] && y > CordGZs[i][1] && x < CordGZs[i][2] && y < CordGZs[i][3]&& z < 500) {
            format(string, sizeof(string), "%s comeзou a dominar a gang zone %s.",name,NomesGZs[i]);
            GangZoneFlashForAll(GZCriadas[i], GetPlayerColor(playerid))
   
        }
    }
    SendClientMessageToAll(0xFFFF00AA, string);
   
    SetTimer("Terminar",60000,false);
    return 1;
}



Re: error: 017: undefined symbol "i" - Biieell - 04.09.2013

Quote:
Originally Posted by zSuYaNw
Посмотреть сообщение
Tente isto,

pawn Код:
if(!strcmp(cmdtext, "/dominar", true))
{
    if(!IsAreaInGangCheck(playerid)) SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: Vocк nгo estб em nenhuma Gang Zone,FAIL");

    new Float, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);

    new name[MAX_PLAYER_NAME], string[44];
    GetPlayerName(playerid, name, sizeof(name));

    for (new i=0; i < GZS_CRIADAS; i++){
        if (x > CordGZs[i][0] && y > CordGZs[i][1] && x < CordGZs[i][2] && y < CordGZs[i][3]&& z < 500) {
            format(string, sizeof(string), "%s comeзou a dominar a gang zone %s.",name,NomesGZs[i]);
            GangZoneFlashForAll(GZCriadas[i], GetPlayerColor(playerid))
   
        }
    }
    SendClientMessageToAll(0xFFFF00AA, string);
   
    SetTimer("Terminar",60000,false);
    return 1;
}
Nгo esquece que ali й new Float:"x", Float:y, Float:z; , porque aqui no forum faz uma carinha.