Jump to content
  • 0

problema Race


InceMan

Question

Problema intalnita (descriere): Salut vreau sa-mi fac un system de joinrace si lam facut bine pana in final dar am o singura eroare la format(str,128, ca acolo imi provoaca si eroarea poate nu am fost atent eu si am gresit undeva
Ero(area / rile) / warning-(ul / urile):

C:\Users\andu\Desktop\FIVEGAME 2016\samp03\gamemodes\FiveGame.pwn(10606) : error 035: argument type mismatch (argument 2)
C:\Users\andu\Desktop\FIVEGAME 2016\samp03\gamemodes\FiveGame.pwn(10606) : warning 215: expression has no effect
C:\Users\andu\Desktop\FIVEGAME 2016\samp03\gamemodes\FiveGame.pwn(10606) : error 001: expected token: ";", but found ")"
C:\Users\andu\Desktop\FIVEGAME 2016\samp03\gamemodes\FiveGame.pwn(10606) : error 029: invalid expression, assumed zero
C:\Users\andu\Desktop\FIVEGAME 2016\samp03\gamemodes\FiveGame.pwn(10606) : 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.
 


Liniile de cod / sursa / script-ul(obligatoriu):public OnPlayerEnterRaceCheckpoint(playerid)
{
    new rTime[3];
    if(UtrkaInfo[utrkaUcitan] == 1)
    {
    if(GetPVarInt(playerid, "Na_Utrci") == 1)
    {
        if(UtrkaInfo[utrkaVozila] == 1)
        {
         if(!IsPlayerInAnyVehicle(playerid))
         {
         KillTimer(EventTimer[playerid]);
         TextDrawHideForPlayer(playerid, TDEvent5[playerid]);
         TextDrawHideForPlayer(playerid, TDEvent6[playerid]);
         TextDrawHideForPlayer(playerid, TDEvent4[playerid]);
         TextDrawHideForPlayer(playerid, TDEvent3[playerid]);
         TextDrawHideForPlayer(playerid, TDEvent2[playerid]);
         TextDrawHideForPlayer(playerid, TDEvent1[playerid]);
         SetPVarInt(playerid, "Na_Utrci", 0);
         DisablePlayerRaceCheckpoint(playerid);
         SendClientMessage(playerid, COLOR_GLAVNA,"You have to be a driver! You're disqualified!");
         return 1;
         }
        }
        if(IsPlayerInRangeOfPoint(playerid, UtrkaInfo[CPRadius], CPInfo[CPid[playerid]][cpX], CPInfo[CPid[playerid]][cpY], CPInfo[CPid[playerid]][cpZ]))
        {
            if(CPInfo[CPid[playerid]][utrkaProlaz] == 1)
               {
                UtrkaProlaz[playerid] = UtrkaProlaz[playerid]+1;
                new TimeStamp,TotalRaceTime;
                TimeStamp = GetTickCount();
                TotalRaceTime = TimeStamp - UtrkaBrojac;
                ConvertTime(var, TotalRaceTime, rTime[0], rTime[1], rTime[2]);
                new str[128]; format(str,128,"-> | %s || Pass-%d(circle %d) || %s || Time: %02d:%02d",UtrkaInfo[utrkaIme], UtrkaProlaz[playerid],KrugProlaz[playerid], PlayerName(playerid), rTime[0], rTime[1]);
                UtrkaPoruka(COLOR_MEDIUMAQUA, str);
            }
            if(UtrkaInfo[utrkaZadnjiCP] == CPid[playerid])
            {
                if(UtrkaInfo[utrkaZadnjiCP] == CPid[playerid])
                {
                    if(UtrkaInfo[utrkaKrugova] > 1)
                    {
                         if(KrugProlaz[playerid] != UtrkaInfo[utrkaKrugova])
                           {
                               CPid[playerid] = 1;
                            if(UtrkaInfo[utrkaZadnjiCP] == CPid[playerid])
                            {
                                SetPlayerRaceCheckpoint(playerid, 1, CPInfo[CPid[playerid]][cpX], CPInfo[CPid[playerid]][cpY], CPInfo[CPid[playerid]][cpZ], CPInfo[CPid[playerid]+1][cpX], CPInfo[CPid[playerid]+1][cpY], CPInfo[CPid[playerid]+1][cpZ], UtrkaInfo[CPRadius]);
                            }
                            else
                            {
                                SetPlayerRaceCheckpoint(playerid, 0, CPInfo[CPid[playerid]][cpX], CPInfo[CPid[playerid]][cpY], CPInfo[CPid[playerid]][cpZ], CPInfo[CPid[playerid]+1][cpX], CPInfo[CPid[playerid]+1][cpY], CPInfo[CPid[playerid]+1][cpZ], UtrkaInfo[CPRadius]);
                            }
                               UtrkaProlaz[playerid] = 0;
                            new TimeStamp,TotalRaceTime;
                            TimeStamp = GetTickCount();
                            TotalRaceTime = TimeStamp - UtrkaBrojac;
                            ConvertTime(var, TotalRaceTime, rTime[0], rTime[1], rTime[2]);
                            new str[128]; format(str,128,"->O | %s || CIRCLE PASSAGE || %d/%d circles || %s | Time: %02d:%02d",UtrkaInfo[utrkaIme], KrugProlaz[playerid],UtrkaInfo[utrkaKrugova], PlayerName(playerid), rTime[0], rTime[1]);
                            UtrkaPoruka(COLOR_MEDIUMAQUA, str);
                            KrugProlaz[playerid] = KrugProlaz[playerid]+1;
                            return 1;
                        }
                    }
                }
                DisablePlayerRaceCheckpoint(playerid);
                new TimeStamp,TotalRaceTime;
                TimeStamp = GetTickCount();
                TotalRaceTime = TimeStamp - UtrkaBrojac;
                ConvertTime(var, TotalRaceTime, rTime[0], rTime[1], rTime[2]);
                RaceZavrsio++;
                new str[128]; format(str,128,"|| %s || FINISH! || %d.%s | Time: %02d:%02d",UtrkaInfo[utrkaIme], RaceZavrsio,PlayerName(playerid), rTime[0], rTime[1]);
                UtrkaPoruka(COLOR_LIGHTRED, str);
                if(RaceZavrsio == 1)
                {
                    if(rTime[0] < UtrkaInfo[utrkaRekordMinuti])
                    {
                        new file[64]; format(file,64,"/races/%s.RACE",UtrkaInfo[utrkaFileIme]);
                        dini_Set(file, "Rekorder", PlayerName(playerid));
                        dini_IntSet(file, "RekordMinuti", rTime[0]);
                        dini_IntSet(file, "RekordSekunde", rTime[1]);
                        UtrkaInfo[utrkaRekordMinuti] = rTime[0];
                        UtrkaInfo[utrkaRekordSekunde] = rTime[1];
                        format(str,128,"TRACK RECORD BROKEN!!! Record broken by: [[%s]] Congratulations!", PlayerName(playerid));
                        UtrkaPoruka(COLOR_LIGHTRED, str);
                    }
                    else if(rTime[0] == UtrkaInfo[utrkaRekordMinuti])
                    {
                        if(rTime[1]< UtrkaInfo[utrkaRekordSekunde])
                        {
                            new file[64]; format(file,64,"/races/%s.RACE",UtrkaInfo[utrkaFileIme]);
                            dini_Set(file, "Rekorder", PlayerName(playerid));
                            dini_IntSet(file, "RekordMinuti", rTime[0]);
                            dini_IntSet(file, "RekordSekunde", rTime[1]);
                            UtrkaInfo[utrkaRekordMinuti] = rTime[0];
                            UtrkaInfo[utrkaRekordSekunde] = rTime[1];
                            format(str,128,"TRACK RECORD BROKEN!!! Record broken by: [[%s]] Congratulations!", PlayerName(playerid));
                            UtrkaPoruka(COLOR_LIGHTRED, str);
                        }
                    }
                }
                TextDrawHideForPlayer(playerid, TDEvent5[playerid]);
                TextDrawHideForPlayer(playerid, TDEvent6[playerid]);
                TextDrawHideForPlayer(playerid, TDEvent4[playerid]);
                TextDrawHideForPlayer(playerid, TDEvent3[playerid]);
                TextDrawHideForPlayer(playerid, TDEvent2[playerid]);
                TextDrawHideForPlayer(playerid, TDEvent1[playerid]);
                KillTimer(EventTimer[playerid]);
                UtrkaProlaz[playerid] = 0;
                  KrugProlaz[playerid]= 1;
                return 1;
            }
            CPid[playerid] = CPid[playerid]+1;
            if(UtrkaInfo[utrkaZadnjiCP] == CPid[playerid])
            {
             if(KrugProlaz[playerid] != UtrkaInfo[utrkaKrugova])
             {
                SetPlayerRaceCheckpoint(playerid, 0, CPInfo[CPid[playerid]][cpX], CPInfo[CPid[playerid]][cpY], CPInfo[CPid[playerid]][cpZ], CPInfo[CPid[playerid]+1][cpX], CPInfo[CPid[playerid]+1][cpY], CPInfo[CPid[playerid]+1][cpZ], UtrkaInfo[CPRadius]);
             }
             else
             {
                SetPlayerRaceCheckpoint(playerid, 1, CPInfo[CPid[playerid]][cpX], CPInfo[CPid[playerid]][cpY], CPInfo[CPid[playerid]][cpZ], CPInfo[CPid[playerid]+1][cpX], CPInfo[CPid[playerid]+1][cpY], CPInfo[CPid[playerid]+1][cpZ], UtrkaInfo[CPRadius]);
             }
            }
            else
            {
                SetPlayerRaceCheckpoint(playerid, 0, CPInfo[CPid[playerid]][cpX], CPInfo[CPid[playerid]][cpY], CPInfo[CPid[playerid]][cpZ], CPInfo[CPid[playerid]+1][cpX], CPInfo[CPid[playerid]+1][cpY], CPInfo[CPid[playerid]+1][cpZ], UtrkaInfo[CPRadius]);
            }
            return 1;
        }
    }
    }
    return 1;
}

Imagini / Video (optional): ne este cazul
Ati incercat sa rezolvati singur?: da 

Acum 1 minut, Geani a spus:

new str[128]; format(str,128,"-> | %s || Pass-%d(circle %d) || %s || Time: %02d:%02d",UtrkaInfo[utrkaIme], UtrkaProlaz[playerid],KrugProlaz[playerid], PlayerName(playerid), rTime[0], rTime[1]);  // De aici provoaca eroarea

 

FiveGame  Lands

Pawno Developer, Mapping , Scripter

Since 2016

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.