Balkan SA:MP

PAWN skriptanje, gamemodovi, filterskripte, include fajlovi, mape, pluginovi => Razgovor u vezi PAWN - skriptanja => Temu započeo: merK^ poslato Oktobar 03, 2012, 19:13:54 POSLE PODNE

Naslov: [POMOC]invalid function or declaration
Poruka od: merK^ poslato Oktobar 03, 2012, 19:13:54 POSLE PODNE
Skripta koju koristim:Moju od 0.
Detaljan opis problema:
Ubacivao sam dialog za poslove,i kad kompilujem ovi errori mi izadju,za ondialogresponse,ne znam sta da radim ceo dan se mucim :S
C:\Documents and Settings\Alen\Desktop\BC-RP\gamemodes\BC-RP.pwn(4718) : warning 225: unreachable code
C:\Documents and Settings\Alen\Desktop\BC-RP\gamemodes\BC-RP.pwn(12930) : error 010: invalid function or declaration
C:\Documents and Settings\Alen\Desktop\BC-RP\gamemodes\BC-RP.pwn(12932) : error 010: invalid function or declaration
C:\Documents and Settings\Alen\Desktop\BC-RP\gamemodes\BC-RP.pwn(12934) : error 010: invalid function or declaration
C:\Documents and Settings\Alen\Desktop\BC-RP\gamemodes\BC-RP.pwn(12939) : error 010: invalid function or declaration
C:\Documents and Settings\Alen\Desktop\BC-RP\gamemodes\BC-RP.pwn(29856) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.

Dio skripte: if(dialogid == Poslovi)
{
if(response)
{
case 0:
{
GettingJob[playerid] = 1;
     }
        }
        return 1;
    }

Kad napravim ovako sa list,izadju mi 4 errora.
if(dialogid == Poslovi) PRVI ERROR
{
if(response) 2 ERROR
{
if(listitem == 0) 3 ERROR
{
GettingJob[playerid] = 1;
     }
        }
        return 1; 4 ERROR
    }

Neke slike/video za lakse dobivanje pomoci(neobavezno):/
Naslov: Odg: [POMOC]invalid function or declaration
Poruka od: Vegas. poslato Oktobar 03, 2012, 19:18:26 POSLE PODNE
Probaj. if(dialogid == Poslovi)
{
if(response)
{
if(listitem == 0)
{
GettingJob[playerid] = 1;
}
}
}
I daj liniju tog unreachable code, možda ti se čini glupo ali ti zatvara neki public.
Naslov: Odg: [POMOC]invalid function or declaration
Poruka od: merK^ poslato Oktobar 03, 2012, 19:20:57 POSLE PODNE
if (BusrouteEast[playerid][0] != 0)
To ti je ta linija,ovaj kod sto si mi dao,sad su mi se smanjili na 3 errora.
Naslov: Odg: [POMOC]invalid function or declaration
Poruka od: Vegas. poslato Oktobar 03, 2012, 19:26:09 POSLE PODNE
To za unreachable code daj mi malo linija ispod i iznad. I daj te errore.
Naslov: Odg: [POMOC]invalid function or declaration
Poruka od: merK^ poslato Oktobar 03, 2012, 19:28:43 POSLE PODNE
C:\Documents and Settings\Alen\Desktop\BC-RP\gamemodes\BC-RP.pwn(4718) : warning 225: unreachable code
C:\Documents and Settings\Alen\Desktop\BC-RP\gamemodes\BC-RP.pwn(12930) : error 010: invalid function or declaration
C:\Documents and Settings\Alen\Desktop\BC-RP\gamemodes\BC-RP.pwn(12932) : error 010: invalid function or declaration
C:\Documents and Settings\Alen\Desktop\BC-RP\gamemodes\BC-RP.pwn(12934) : error 010: invalid function or declaration
C:\Documents and Settings\Alen\Desktop\BC-RP\gamemodes\BC-RP.pwn(29855) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


3 Errors.


Unreachable:
if (BusrouteEast[playerid][0] != 0)
{
if (IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == 2)
{
new nextstop[64];
BusrouteWest[playerid][0] = 0;
    switch(BusrouteEast[playerid][0])
    {
        case 1:
        {
nextstop = "Airport";
            SetPlayerCheckpoint(playerid, 1979.7369,-2171.4861,13.5363, 5.0);
AdvertiseToPlayersAtBusStop(1979.7369,-2171.4861,13.5363, 0);
}
case 2:
{
nextstop = "Willowfield Factory";
    SetPlayerCheckpoint(playerid, 2227.6953,-2201.9053,13.5164, 5.0);
AdvertiseToPlayersAtBusStop(2227.6953,-2201.9053,13.5164, 0);
SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
TogglePlayerControllable(playerid, 0);
SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "You have to wait 10 seconds.");
}
case 3:
{
nextstop = "Loco";
    SetPlayerCheckpoint(playerid, 2719.9419,-2030.2104,13.5076, 5.0);
AdvertiseToPlayersAtBusStop(2719.9419,-2030.2104,13.5076, 0);
SetTimerEx("busroutestoptimer", 10000, false, "i", playerid);
TogglePlayerControllable(playerid, 0);
SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "You have to wait 10 seconds.");
}

I tako idu case 4 itd,itd.


RESIO SAM UNREACHABLE CODE!!!
Jos 3 errora.
Naslov: Odg: [POMOC]invalid function or declaration
Poruka od: Vegas. poslato Oktobar 03, 2012, 19:31:10 POSLE PODNE
Nemogu da skontam gdje si stavio return. A taj dijalog da li si stavio OnDialogResponse?
Naslov: Odg: [POMOC]invalid function or declaration
Poruka od: merK^ poslato Oktobar 03, 2012, 19:33:01 POSLE PODNE
Resio sam to unreachable,ovo jesam stavio ondialog response.
EDIT:Resio sam i ova 3 errora,samo sam premestio ceo kod na prvo mesto u ondialogresponse,hvala ti u svakom slucaju.