SA-MP Forums Archive
[Ajuda] Erros ! - 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] Erros ! (/showthread.php?tid=501045)



Erros ! - BaianoIn - 16.03.2014

Os seguintes erros:

pawn Код:
G:\gm by master_pawn\gm by master_pawn\Brasil Gold Revolution RP\gamemodes\BCF2.pwn(75761) : error 003: declaration of a local variable must appear in a compound block
G:\gm by master_pawn\gm by master_pawn\Brasil Gold Revolution RP\gamemodes\BCF2.pwn(75761) : error 017: undefined symbol "stringao"
G:\gm by master_pawn\gm by master_pawn\Brasil Gold Revolution RP\gamemodes\BCF2.pwn(75761) : warning 215: expression has no effect
G:\gm by master_pawn\gm by master_pawn\Brasil Gold Revolution RP\gamemodes\BCF2.pwn(75761) : error 001: expected token: ";", but found "]"
G:\gm by master_pawn\gm by master_pawn\Brasil Gold Revolution RP\gamemodes\BCF2.pwn(75761) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
esta acontecendo na seguinte linha
pawn Код:
forward SyncClock();
public SyncClock()
{
    for(new i; i != MAX_PLAYERS; i++)
        if(IsPlayerConnected(i))

    new stringao[211];//linha 75761

    gettime(ClockTime[tHour], ClockTime[tMinute], ClockTime[tSecond]);
    getdate(ClockTime[dYear], ClockTime[dMonth], ClockTime[dDay]);
    format(stringao,128, "%s~n~%02d:%02d:%02d - %02d/%02d/%d ",SITE_URL, ClockTime[tHour], ClockTime[tMinute], ClockTime[tSecond], ClockTime[dDay], ClockTime[dMonth], ClockTime[dYear], Online, GetMaxPlayers());
    TextDrawSetString(ServerLogo2, stringao);
}



Re: Erros ! - bruxo00 - 16.03.2014

Tenta assim:

PHP код:
public SyncClock()
{
    for(new 
i!= MAX_PLAYERSi++)
    {
        if(!
IsPlayerConnected(i)) continue;
        new 
stringao[128];//linha 75761
        
gettime(ClockTime[tHour], ClockTime[tMinute], ClockTime[tSecond]);
        
getdate(ClockTime[dYear], ClockTime[dMonth], ClockTime[dDay]);
        
format(stringaosizeof(stringao), "%s~n~%02d:%02d:%02d - %02d/%02d/%d ",SITE_URLClockTime[tHour], ClockTime[tMinute], ClockTime[tSecond], ClockTime[dDay], ClockTime[dMonth], ClockTime[dYear], OnlineGetMaxPlayers());
        
TextDrawSetString(ServerLogo2stringao);
    }