[Pomoc]Errori

Započeo V_More, Januar 05, 2012, 20:34:15 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 6 gostiju pregledaju ovu temu.

Skripta koju koristim:Moj mod od 0
Detaljan opis problema: Pa ima nekih errore, inace treba da se napravi da u dialogu bira Spawn i sad evo:
Dio skripte:case DIALOG_SPAWN: //linija 418
{
if(response)
{
   case 0: //linija 422
   SpawnPlayer(playerid);
   SetPlayerPos(playerid, x, y, z);
   SetPlayerSkin(playerid, 7);
   }
   
   case 1:
   SpawnPlayer(playerid);
   SetPlayerPos(playerid, x, y, z);
   SetPlayerSkin(playerid, 35);
   }
   case 2:
   SpawnPlayer(playerid);
   SetPlayerPos(playerid, x, y, z);
   SetPlayerSkin(playerid, 101);
   }
   case 3:
   SpawnPlayer(playerid);
   SetPlayerPos(playerid, x, y, z);
   SetPlayerSkin(playerid, 299);
   }
   return 1;
}


Errori:
C:\Documents and Settings\User\My Documents\My Documents\Downloads\Matrix Gaming\Hard RP\gamemodes\matrix.pwn(418) : error 040: duplicate "case" label (value 4)
C:\Documents and Settings\User\My Documents\My Documents\Downloads\x Gaming\Hard RP\gamemodes\matrix.pwn(422) : error 014: invalid statement; not in switch
C:\Documents and Settings\User\My Documents\My Documents\Downloads\x Gaming\Hard RP\gamemodes\matrix.pwn(422) : warning 215: expression has no effect
C:\Documents and Settings\User\My Documents\My Documents\Downloads\x Gaming\Hard RP\gamemodes\matrix.pwn(422) : error 001: expected token: ";", but found ":"
C:\Documents and Settings\User\My Documents\My Documents\Downloads\x Gaming\Hard RP\gamemodes\matrix.pwn(422) : error 029: invalid expression, assumed zero
C:\Documents and Settings\User\My Documents\My Documents\Downloads\X Gaming\Hard RP\gamemodes\matrix.pwn(422) : fatal error 107: too many error messages on one line

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


5 Errors.

Neke slike/video za lakse dobivanje pomoci(neobavezno)://

Poslednja Izmena: Januar 05, 2012, 20:35:10 POSLE PODNE od |BU| Vectro64
Last nick: Vectro64

if(dialogid == DIALOG_SPAWN)
{
if(response)
{
   if(listitem == 0)
   {
   SpawnPlayer(playerid);
   SetPlayerPos(playerid, x, y, z);
   SetPlayerSkin(playerid, 7);
   }
    if(listitem == 1)
   {
   SpawnPlayer(playerid);
   SetPlayerPos(playerid, x, y, z);
   SetPlayerSkin(playerid, 35);
   }
    if(listitem == 2)
   {
   SpawnPlayer(playerid);
   SetPlayerPos(playerid, x, y, z);
   SetPlayerSkin(playerid, 101);
   }
    if(listitem == 3)
   {
   SpawnPlayer(playerid);
   SetPlayerPos(playerid, x, y, z);
   SetPlayerSkin(playerid, 299);
   }
                            }
   return 1;
}
Poslednja Izmena: Januar 05, 2012, 20:39:59 POSLE PODNE od [TL:RP] Gotti747
Citat: ...Neno... poslato Januar 26, 2013, 23:31:02 POSLE PODNE
Poceo sam mapati i tu je doslo do problema.Nakon par mapa,vidio sam post Gottia i kaze da nista nevalja da je katastrofa,i pocnemo se svadjati,psovati.Popusimo bananu obojica,i nakon toga nesto sam napravio (mapu) i Gotti kaze dobra,uh reko opet me zajebava,i saljem ja njemu na pm reko ti mene zajebavas,kaze on ne,i pomirimo se.Nakon toga postali smo dosta dobri

Citat: [TL:RP] Gotti747 poslato Januar 05, 2012, 20:38:41 POSLE PODNE
if(dialogid == DIALOG_SPAWN)
{
if(response)
{
   if(listitem == 0)
   {
   SpawnPlayer(playerid);
   SetPlayerPos(playerid, x, y, z);
   SetPlayerSkin(playerid, 7);
   }
    if(listitem == 1)
   {
   SpawnPlayer(playerid);
   SetPlayerPos(playerid, x, y, z);
   SetPlayerSkin(playerid, 35);
   }
    if(listitem == 2)
   {
   SpawnPlayer(playerid);
   SetPlayerPos(playerid, x, y, z);
   SetPlayerSkin(playerid, 101);
   }
    if(listitem == 3)
   {
   SpawnPlayer(playerid);
   SetPlayerPos(playerid, x, y, z);
   SetPlayerSkin(playerid, 299);
   }
                            }
   return 1;
}


Onda ima 26 errora, pa sam radio Undo, ne moze ipak tako, moze pomoc, hitno?
Last nick: Vectro64

Daj da vidim errore  ::)
Citat: ...Neno... poslato Januar 26, 2013, 23:31:02 POSLE PODNE
Poceo sam mapati i tu je doslo do problema.Nakon par mapa,vidio sam post Gottia i kaze da nista nevalja da je katastrofa,i pocnemo se svadjati,psovati.Popusimo bananu obojica,i nakon toga nesto sam napravio (mapu) i Gotti kaze dobra,uh reko opet me zajebava,i saljem ja njemu na pm reko ti mene zajebavas,kaze on ne,i pomirimo se.Nakon toga postali smo dosta dobri

ovo prvo ti je ok, samo sto ti je 2 puta deklarisan isti dialog id i koristis ga 2. put u case-u
Just one more time.

Citat: [PG] Pacino poslato Januar 05, 2012, 20:46:33 POSLE PODNE
ovo prvo ti je ok, samo sto ti je 2 puta deklarisan isti dialog id i koristis ga 2. put u case-u

Ne kontam, mozes malo da pojasnis?
Last nick: Vectro64

#define IME_DIALOGA ID_DIALOGA

imas negdje razlicito ime dialoga a isti id, pa sada ga 2 puta koristis pod case dialogid...
Just one more time.

Citat: [PG] Pacino poslato Januar 05, 2012, 20:55:48 POSLE PODNE
#define IME_DIALOGA ID_DIALOGA

imas negdje razlicito ime dialoga a isti id, pa sada ga 2 puta koristis pod case dialogid...

Jesi siguran, imam samo 4 dialoga, i imaju razlicite ID-ove i nazive, nije do toga ja msm:D
Last nick: Vectro64

case DIALOG_SPAWN: //linija 418
{
if(response)
{
switch(listitem)
{
    case 0:
{//linija 422
SpawnPlayer(playerid);
SetPlayerPos(playerid, x, y, z);
SetPlayerSkin(playerid, 7);
    }
   
    case 1:
{
    SpawnPlayer(playerid);
    SetPlayerPos(playerid, x, y, z);
    SetPlayerSkin(playerid, 35);
    }
    case 2:
{
    SpawnPlayer(playerid);
    SetPlayerPos(playerid, x, y, z);
    SetPlayerSkin(playerid, 101);
    }
    case 3:
{
    SpawnPlayer(playerid);
    SetPlayerPos(playerid, x, y, z);
    SetPlayerSkin(playerid, 299);
    }

}
}
}

Eto..
Just one more time.

Ok, sada ima manje errora, ovo x se moze zanemarit, jer to cu kasnije unijet koordinate, a evo sta jios ima:

C:\Documents and Settings\User\My Documents\My Documents\Downloads\Matrix Gaming\Hard RP\gamemodes\matrix.pwn(418) : error 040: duplicate "case" label (value 4)
C:\Documents and Settings\User\My Documents\My Documents\Downloads\Matrix Gaming\Hard RP\gamemodes\matrix.pwn(427) : error 017: undefined symbol "x"
C:\Documents and Settings\User\My Documents\My Documents\Downloads\Matrix Gaming\Hard RP\gamemodes\matrix.pwn(434) : error 017: undefined symbol "x"
C:\Documents and Settings\User\My Documents\My Documents\Downloads\Matrix Gaming\Hard RP\gamemodes\matrix.pwn(440) : error 017: undefined symbol "x"
C:\Documents and Settings\User\My Documents\My Documents\Downloads\Matrix Gaming\Hard RP\gamemodes\matrix.pwn(446) : error 017: undefined symbol "x"
C:\Documents and Settings\User\My Documents\My Documents\Downloads\Matrix Gaming\Hard RP\gamemodes\matrix.pwn(453) : error 002: only a single statement (or expression) can follow each "case"
C:\Documents and Settings\User\My Documents\My Documents\Downloads\Matrix Gaming\Hard RP\gamemodes\matrix.pwn(453) : warning 215: expression has no effect
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


6 Errors.
Last nick: Vectro64

case DIALOG_SPAWN: //linija 418
{
if(response)
{
switch(listitem)
{
case 0:
{
SpawnPlayer(playerid);
SetPlayerPos(playerid, x, y, z);
SetPlayerSkin(playerid, 7);
}
case 1:
{
SpawnPlayer(playerid);
SetPlayerPos(playerid, x, y, z);
SetPlayerSkin(playerid, 35);
}
case 2:
{
SpawnPlayer(playerid);
SetPlayerPos(playerid, x, y, z);
SetPlayerSkin(playerid, 101);
}
case 3:
{
SpawnPlayer(playerid);
SetPlayerPos(playerid, x, y, z);
SetPlayerSkin(playerid, 299);
}
}
}
}

Probaj sad, ako se bude 1. ponovio onda je 100% do onoga sto sam ti ja gore reko...
Just one more time.

Opet isti errori, ne vidim ni sta si promenio?
Last nick: Vectro64

Mr.Gagi

Isti ti je dialogid. Ili promeni pod DIALOG_SPAWN ili mozes koristiti DIALOG_SPAWN+1 (DIALOG_SPAWN + neki_broj)

EDIT:
Cini mi se i da je Pacino to vec objasnio gore
Poslednja Izmena: Januar 05, 2012, 21:16:02 POSLE PODNE od [TL:RP]Mr.Gagi

Citat: [TL:RP]Mr.Gagi poslato Januar 05, 2012, 21:15:31 POSLE PODNE
Isti ti je dialogid. Ili promeni pod DIALOG_SPAWN ili mozes koristiti DIALOG_SPAWN+1 (DIALOG_SPAWN + neki_broj)

EDIT:
Cini mi se i da je Pacino to vec objasnio gore

Promjenio sam umjesto DIALOG_SPAWN u DIALOG_SPAWNE i opet isto?
Last nick: Vectro64

Mr.Gagi

Citat: |BU| Vectro64 poslato Januar 05, 2012, 21:18:35 POSLE PODNE
Citat: [TL:RP]Mr.Gagi poslato Januar 05, 2012, 21:15:31 POSLE PODNE
Isti ti je dialogid. Ili promeni pod DIALOG_SPAWN ili mozes koristiti DIALOG_SPAWN+1 (DIALOG_SPAWN + neki_broj)

EDIT:
Cini mi se i da je Pacino to vec objasnio gore

Promjenio sam umjesto DIALOG_SPAWN u DIALOG_SPAWNE i opet isto?
Isti ti je dialogid nisi promeni dialogid
Evo ovako uradi
#define DIALOG_NESTO    9389

I pod ShowPlayerDialog umesto DIALOG_SPAWN (taj za to) stavi DIALOG_NESTO i umesto case DIALOG_SPAWN: stavis case  DIALOG_NESTO:
Testirao sam ako je isti ID i do tog je