[HELP] With one error.
#1

pawn Код:
if(RegistrationStep[playerid] > 0)
    {
        if(RegistrationStep[playerid] == 1)
        {
            new idx;
            tmp = strtok(text, idx);
            if((strcmp("musko", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("musko")))
            {
                PlayerInfo[playerid][pSex] = 1;
                ClearChatbox(playerid, 8);
                SendClientMessage(playerid, COLOR_YELLOW, "-----------------------------------------------------------------------");
                SendClientMessage(playerid, COLOR_GREEN, "Ok, znaci musko ste.");
                SendClientMessage(playerid, COLOR_GREEN, "2. Koji je vas datum rodjenja? (Koristite dd/mm/yyyy)");
                SendClientMessage(playerid, COLOR_YELLOW, "-----------------------------------------------------------------------");
                ClearChatbox(playerid, 2);
                new maleskin;
                maleskin = random(sizeof(CivMalePeds));
                SetPlayerSkin(playerid, maleskin);
                PlayerInfo[playerid][pChar] = maleskin;
                RegistrationStep[playerid] = 2;
                return 0;
            }
            else if((strcmp("zensko", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("female")))
            {
                PlayerInfo[playerid][pSex] = 2;
                ClearChatbox(playerid, 8);
                SendClientMessage(playerid, COLOR_YELLOW, "-----------------------------------------------------------------------");
                SendClientMessage(playerid, COLOR_GREEN, "Ok, znaci zensko ste.");
                SendClientMessage(playerid, COLOR_GREEN, "2. Koji je vas datum rodjenja? (Koristite dd/mm/yyyy)");
                SendClientMessage(playerid, COLOR_YELLOW, "-----------------------------------------------------------------------");
                ClearChatbox(playerid, 2);
                new femaleskin;
                femaleskin = random(sizeof(CivFemalePeds));
                SetPlayerSkin(playerid, femaleskin);
                SetPlayerSkin(playerid, femaleskin);
                PlayerInfo[playerid][pChar] = femaleskin;
                RegistrationStep[playerid] = 2;
                return 0;
            }
            else
            {
                ClearChatbox(playerid, 8);
                SendClientMessage(playerid, COLOR_YELLOW, "-----------------------------------------------------------------------");
                SendClientMessage(playerid, COLOR_GREEN, "Da li ste musko ili zensko?.");
                SendClientMessage(playerid, COLOR_YELLOW, "-----------------------------------------------------------------------");
                ClearChatbox(playerid, 2);
            }
            return 0;
        }
        else if(RegistrationStep[playerid] == 2)
        {
            new year, month,day;
            getdate(year, month, day);
            new DateInfo[3][20];
            split(text, DateInfo, '/');
            if(year - strvalEx(DateInfo[2]) > 100 || strvalEx(DateInfo[2]) < 1 || strvalEx(DateInfo[2]) >= year)
            {
                ClearChatbox(playerid, 8);
                SendClientMessage(playerid, COLOR_YELLOW, "-----------------------------------------------------------------------");
                SendClientMessage(playerid, COLOR_GREEN, "Koji je vas datum rodjenja? (Kucajte dd/mm/yyyy)");
                SendClientMessage(playerid, COLOR_YELLOW, "-----------------------------------------------------------------------");
                ClearChatbox(playerid, 2);
                return 0;
            }
            new check = year - strvalEx(DateInfo[2]);
            if(check == year)
            {
                ClearChatbox(playerid, 8);
                SendClientMessage(playerid, COLOR_YELLOW, "-----------------------------------------------------------------------");
                SendClientMessage(playerid, COLOR_GREEN, "Koji je vas datum rodjenja? (Kucajte dd/mm/yyyy)");
                SendClientMessage(playerid, COLOR_YELLOW, "-----------------------------------------------------------------------");
                ClearChatbox(playerid, 2);
                return 0;
            }
            if(strvalEx(DateInfo[1]) > month)
            {
                check -= 1;
            }
            else if(strvalEx(DateInfo[1]) == month && strval(DateInfo[0]) > day)
            {
                check -= 1;
            }
            PlayerInfo[playerid][pAge] = check;
            ClearChatbox(playerid, 8);
            SendClientMessage(playerid, COLOR_YELLOW, "-----------------------------------------------------------------------");
            format(string, sizeof(string), "Ok, znaci imate %d godina.",PlayerInfo[playerid][pAge]);
            SendClientMessage(playerid, COLOR_GREEN, string);
            RegistrationStep[playerid] = 3;
            SendClientMessage(playerid, COLOR_GREEN, "3. Odakle ste? (Kucajte: Srbija, Makedonija, BiH, Hrvatska, Ostalo)");
            SendClientMessage(playerid, COLOR_YELLOW, "-----------------------------------------------------------------------");
            ClearChatbox(playerid, 2);
            return 0;
        }
        else if(RegistrationStep[playerid] == 3)
        {
            new idx;
            tmp = strtok(text, idx);
            if((strcmp("Srbija", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("Srbija")))
            {
                PlayerInfo[playerid][pOrigin] = 1;
                ClearChatbox(playerid, 8);
                SendClientMessage(playerid, COLOR_YELLOW, "-----------------------------------------------------------------------");
                SendClientMessage(playerid, COLOR_GREEN, "Dobrodosli na Balkan Street, sada ce vam biti prikazan tutorijal.");
                SendClientMessage(playerid, COLOR_YELLOW, "-----------------------------------------------------------------------");
                ClearChatbox(playerid, 2);
                RegistrationStep[playerid] = 0;
                TutTime[playerid] = 1;
                return 0;
            }
            else if((strcmp("Makedonija", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("Makedonija")))
            {
                PlayerInfo[playerid][pOrigin] = 2;
                ClearChatbox(playerid, 8);
                SendClientMessage(playerid, COLOR_YELLOW, "-----------------------------------------------------------------------");
                SendClientMessage(playerid, COLOR_GREEN, "Dobrodosli na Balkan Street, sada ce vam biti prikazan tutorijal.");
                SendClientMessage(playerid, COLOR_YELLOW, "-----------------------------------------------------------------------");
                ClearChatbox(playerid, 2);
                RegistrationStep[playerid] = 0;
                TutTime[playerid] = 1;
                return 0;
            }
            else if((strcmp("BiH", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("BiH")))
            {
                PlayerInfo[playerid][pOrigin] = 3;
                ClearChatbox(playerid, 8);
                SendClientMessage(playerid, COLOR_YELLOW, "-----------------------------------------------------------------------");
                SendClientMessage(playerid, COLOR_GREEN, "Dobrodosli na Balkan Street, sada ce vam biti prikazan tutorijal.");
                SendClientMessage(playerid, COLOR_YELLOW, "-----------------------------------------------------------------------");
                ClearChatbox(playerid, 2);
                RegistrationStep[playerid] = 0;
                TutTime[playerid] = 1;
                return 0;
            }
            else if((strcmp("Hrvatska", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("Hrvatska")))
            {
                PlayerInfo[playerid][pOrigin] = 4;
                ClearChatbox(playerid, 8);
                SendClientMessage(playerid, COLOR_YELLOW, "-----------------------------------------------------------------------");
                SendClientMessage(playerid, COLOR_GREEN, "Dobrodosli na Balkan Street, sada ce vam biti prikazan tutorijal.");
                SendClientMessage(playerid, COLOR_YELLOW, "-----------------------------------------------------------------------");
                ClearChatbox(playerid, 2);
                RegistrationStep[playerid] = 0;
                TutTime[playerid] = 1;
                return 0;
            }
            else if((strcmp("Ostalo", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("Ostalo")))
            {
                PlayerInfo[playerid][pOrigin] = 5;
                ClearChatbox(playerid, 8);
                SendClientMessage(playerid, COLOR_YELLOW, "-----------------------------------------------------------------------");
                SendClientMessage(playerid, COLOR_GREEN, "Dobrodosli na Balkan Street, sada ce vam biti prikazan tutorijal.");
                SendClientMessage(playerid, COLOR_YELLOW, "-----------------------------------------------------------------------");
                ClearChatbox(playerid, 2);
                RegistrationStep[playerid] = 0;
                TutTime[playerid] = 1;
                return 0;
            }
            else
            {
                ClearChatbox(playerid, 8)
                SendClientMessage(playerid, COLOR_YELLOW, "-----------------------------------------------------------------------");
                SendClientMessage(playerid, COLOR_GREEN,  "Odakle ste? (Kucajte: Srbija, Makedonija, BiH, Hrvatska, Ostalo)");
                SendClientMessage(playerid, COLOR_YELLOW, "-----------------------------------------------------------------------");
                ClearChatbox(playerid, 2);
            }
            return 0;
        }
    }

Error: (48060) : error 001: expected token: ";", but found "-identifier-"
Line:
pawn Код:
SendClientMessage(playerid, COLOR_YELLOW, "-----------------------------------------------------------------------");
Reply
#2

Try to look at the previous line(s), theres a ";" missing
Reply
#3

check out the line above^^
pawn Код:
else
            {
                ClearChatbox(playerid, 8)
                SendClientMessage(playerid, COLOR_YELLOW, "-----------------------------------------------------------------------");
                SendClientMessage(playerid, COLOR_GREEN,  "Odakle ste? (Kucajte: Srbija, Makedonija, BiH, Hrvatska, Ostalo)");
                SendClientMessage(playerid, COLOR_YELLOW, "-----------------------------------------------------------------------");
                ClearChatbox(playerid, 2);
            }
"ClearChatbox(playerid, " should be "ClearChatbox(playerid, ;"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)