( Pomoc ) Dialog Error...

Započeo Alan ã‹¡, Jul 02, 2013, 13:53:19 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta : SLRP...

Pravim novi hs pa sad trenutno ovde imam errore...

ERRORI :

C:\Users\Braco\Desktop\SLRP\gamemodes\SLRP.pwn(18388) : error 014: invalid statement; not in switch
C:\Users\Braco\Desktop\SLRP\gamemodes\SLRP.pwn(18388) : warning 215: expression has no effect
C:\Users\Braco\Desktop\SLRP\gamemodes\SLRP.pwn(18388) : error 001: expected token: ";", but found ":"
C:\Users\Braco\Desktop\SLRP\gamemodes\SLRP.pwn(18388) : error 029: invalid expression, assumed zero
C:\Users\Braco\Desktop\SLRP\gamemodes\SLRP.pwn(18388) : 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.


LINIJA :

Nema to sto sam radio nikve veze sa ovim ali daje mi ovde error...

case DIALOG_KKONTROLA:

CIJELI KOD STO SAM RADIO...

case DIALOG_PRODAJ_KUCU_IGRACU:
{
if (!response) return SCM(playerid, BELA, "Odustali ste od prodaje kuce ");
if(response)
{
new targetid;
new cena;
if(sscanf(inputtext, "ui", targetid, cena)) return SPD(playerid, DIALOG_PRODAJ_KUCU_IGRACU, DSI, "Prodaja kuce", "Unesi [ID/DioImena] [Cijena]", "Ponudi", "Odustani");
//if(PlayerInfo[targetid][pLogin] < 1) return SCM(playerid, ZUTA, "Igrac se nije ulogovao");
if(PlayerInfo[targetid][pKucaKljuc] != 999) return SCM(playerid, PLAVA, "Igrac vec posjeduje kucu");
if(targetid == playerid) return SCM(playerid, ZUTA, "Nemozete sami sebi ponuditi prodaju");
if (ProxDetectorS(10.0, playerid, targetid))
{
if(cena < 5000) return SCM(playerid, BELA, "Nesmijete ispod 5000$");
if(GetPlayerMoney(targetid) < cena) return SCM(playerid, BELA, "Igrac nema dovoljno novca");
ProdavacKuce[targetid] = playerid;
CenaKuce[targetid] = cena;

new str[128];
format(str, sizeof(str), "Igrac %s vam je ponudio kucu\n[ID %d]\n[Vrsta %s]\n[Cijena %d]", ImePrezime(playerid), PlayerInfo[playerid][pKucaKljuc], KucaType(PlayerInfo[playerid][pKucaKljuc]), cena);
SPD(targetid, DIALOG_PRODAJA_KUCE, DSB, "Prodaja", str, "Prihvati", "Odbij");
SetPVarInt(playerid,"ProdajesKucu",1);
}
}
}
}


Ovo je ta linija....  8)   8)  8)

case DIALOG_KKONTROLA:

pax95

Citat: Alan ã‹¡ poslato Jul 02, 2013, 14:00:42 POSLE PODNE
Ovo je ta linija....  8)   8)  8)

case DIALOG_KKONTROLA:
Taj case ti je van
switch(dialogid)
{
}

EDIT:
Bar ja tako mislim po onom gore sto je rekao error, a i rekao bih da imas viska } jedino ako tu nije kraj switcha
Poslednja Izmena: Jul 02, 2013, 14:08:27 POSLE PODNE od [AG] Mr.Gagi

Rijesio,imam sada ove errore...

ERRORI :

C:\Users\Braco\Desktop\SLRP\gamemodes\SLRP.pwn(18358) : error 002: only a single statement (or expression) can follow each "case"
C:\Users\Braco\Desktop\SLRP\gamemodes\SLRP.pwn(18358 -- 18359) : error 028: invalid subscript (not an array or too many subscripts): "dialogid"
C:\Users\Braco\Desktop\SLRP\gamemodes\SLRP.pwn(18358 -- 18360) : error 001: expected token: "}", but found "case"
C:\Users\Braco\Desktop\SLRP\gamemodes\SLRP.pwn(18358 -- 18360) : 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.



LINIJA : 18358

switch( dialogid )

LINIJA : 18359

{

LINIJA : 18360

case DIALOG_PRODAJ_KUCU_IGRACU:





CIJELI KOD :

case DIALOG_PRODAJA_KUCE:
{
if(!response)
{
GameTextForPlayer(ProdavacKuce[playerid], "Igrac je odbio vasu ponudu", 3000, 5);
}
if(response)
{
GivePlayerMoney(playerid, -CenaKuce[playerid]);
PlayerInfo[playerid][pNovcanik] -= CenaKuce[playerid];

GivePlayerMoney(ProdavacKuce[playerid], CenaKuce[playerid]);
PlayerInfo[ProdavacKuce[playerid]][pNovcanik] += CenaKuce[playerid];

KucaInfo[PlayerInfo[ProdavacKuce[playerid]][pKucaKljuc]][kOwner] = ImePrezime(playerid);
PlayerInfo[playerid][pKucaKljuc] = PlayerInfo[ProdavacKuce[playerid]][pKucaKljuc];
PlayerInfo[ProdavacKuce[playerid]][pKucaKljuc] = 999;

GameTextForPlayer(ProdavacKuce[playerid], "Prodao si kucu", 2000,5);
new str[128];
format(str, sizeof(str), "Prodali ste kucu %s-u za %d$", ImePrezime(playerid), CenaKuce[playerid]);
SCM(ProdavacKuce[playerid], BELA, str);
new str2[128];
format(str2, sizeof(str2), "Kupio si kucu od %s-a za %d $", ImePrezime(ProdavacKuce[playerid]), CenaKuce[playerid]);
SCM(playerid, BELA, str2);

new string[20];
format(string, sizeof(string), " ");

UpdateDynamic3DTextLabelText(KucaText[PlayerInfo[playerid][pKucaKljuc]], 0x9EC73DAA, string);
new vstr[500];
new ulicaf[128];
ulicaf = KucaUlica(PlayerInfo[playerid][pKucaKljuc]);
format(vstr, sizeof(vstr), "{FFFFFF}Vlasnik: {00FF22}%s\n{FFFFFF}ID: {00FF22}%d\n{FFFFFF}Adresa {00FF22}%s\n{FFFFFF}Vrsta: {00FF22}%s",KucaInfo[PlayerInfo[playerid][pKucaKljuc]][kOwner], PlayerInfo[playerid][pKucaKljuc], ulicaf, KucaType(PlayerInfo[playerid][pKucaKljuc]));
KucaText[PlayerInfo[playerid][pKucaKljuc]] = CreateDynamic3DTextLabel(vstr, 0xFF0000CC, KucaInfo[PlayerInfo[playerid][pKucaKljuc]][kEntranceX], KucaInfo[PlayerInfo[playerid][pKucaKljuc]][kEntranceY], KucaInfo[PlayerInfo[playerid][pKucaKljuc]][kEntranceZ], 30.0);

KucaInfo[PlayerInfo[playerid][pKucaKljuc]][kZabranaRenta] = 1;
SetPVarInt(ProdavacKuce[playerid],"ProdajesKucu",0);
ProdavacKuce[playerid] = 999;
CenaKuce[playerid] = -1;
SacuvajKuce(PlayerInfo[playerid][pKucaKljuc]);
SSACC(playerid);
}
}
switch( dialogid )
{

pax95

Mislim da imas dva ista dialogid-a ili nesto slicno poklapaju ti se dva case-a


Other Dimension RolePlay | Uskoro
Ukoliko zelite pomoci u razvoju servera, mozete se meni javit na PP/PM!

Imam sad ove errore...

C:\Users\Braco\Desktop\SLRP\gamemodes\SLRP.pwn(18359) : error 014: invalid statement; not in switch
C:\Users\Braco\Desktop\SLRP\gamemodes\SLRP.pwn(18359) : warning 215: expression has no effect
C:\Users\Braco\Desktop\SLRP\gamemodes\SLRP.pwn(18359) : error 001: expected token: ";", but found ":"
C:\Users\Braco\Desktop\SLRP\gamemodes\SLRP.pwn(18359) : error 029: invalid expression, assumed zero
C:\Users\Braco\Desktop\SLRP\gamemodes\SLRP.pwn(18359) : 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.


Linija :

case DIALOG_PRODAJ_KUCU_IGRACU:


Cijeli kod sto sam radio...
case DIALOG_PRODAJA_KUCE:
{
if(!response)
{
GameTextForPlayer(ProdavacKuce[playerid], "Igrac je odbio vasu ponudu", 3000, 5);
}
if(response)
{
GivePlayerMoney(playerid, -CenaKuce[playerid]);
PlayerInfo[playerid][pNovcanik] -= CenaKuce[playerid];

GivePlayerMoney(ProdavacKuce[playerid], CenaKuce[playerid]);
PlayerInfo[ProdavacKuce[playerid]][pNovcanik] += CenaKuce[playerid];

KucaInfo[PlayerInfo[ProdavacKuce[playerid]][pKucaKljuc]][kOwner] = ImePrezime(playerid);
PlayerInfo[playerid][pKucaKljuc] = PlayerInfo[ProdavacKuce[playerid]][pKucaKljuc];
PlayerInfo[ProdavacKuce[playerid]][pKucaKljuc] = 999;

GameTextForPlayer(ProdavacKuce[playerid], "Prodao si kucu", 2000,5);
new str[128];
format(str, sizeof(str), "Prodali ste kucu %s-u za %d$", ImePrezime(playerid), CenaKuce[playerid]);
SCM(ProdavacKuce[playerid], BELA, str);
new str2[128];
format(str2, sizeof(str2), "Kupio si kucu od %s-a za %d $", ImePrezime(ProdavacKuce[playerid]), CenaKuce[playerid]);
SCM(playerid, BELA, str2);

new string[20];
format(string, sizeof(string), " ");

UpdateDynamic3DTextLabelText(KucaText[PlayerInfo[playerid][pKucaKljuc]], 0x9EC73DAA, string);
new vstr[500];
new ulicaf[128];
ulicaf = KucaUlica(PlayerInfo[playerid][pKucaKljuc]);
format(vstr, sizeof(vstr), "{FFFFFF}Vlasnik: {00FF22}%s\n{FFFFFF}ID: {00FF22}%d\n{FFFFFF}Adresa {00FF22}%s\n{FFFFFF}Vrsta: {00FF22}%s",KucaInfo[PlayerInfo[playerid][pKucaKljuc]][kOwner], PlayerInfo[playerid][pKucaKljuc], ulicaf, KucaType(PlayerInfo[playerid][pKucaKljuc]));
KucaText[PlayerInfo[playerid][pKucaKljuc]] = CreateDynamic3DTextLabel(vstr, 0xFF0000CC, KucaInfo[PlayerInfo[playerid][pKucaKljuc]][kEntranceX], KucaInfo[PlayerInfo[playerid][pKucaKljuc]][kEntranceY], KucaInfo[PlayerInfo[playerid][pKucaKljuc]][kEntranceZ], 30.0);

KucaInfo[PlayerInfo[playerid][pKucaKljuc]][kZabranaRenta] = 1;
SetPVarInt(ProdavacKuce[playerid],"ProdajesKucu",0);
ProdavacKuce[playerid] = 999;
CenaKuce[playerid] = -1;
SacuvajKuce(PlayerInfo[playerid][pKucaKljuc]);
SSACC(playerid);
}
}
}