[POMOC]

Započeo Alezars, Septembar 08, 2013, 21:26:00 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Skripta koju koristim:South Europe
Detaljan opis problema:Problem sa komandom /kreirajkucu izbacuje mi par errora
Dio skripte: Evo eroraC:\Users\Stefan\Desktop\Paun\gamemodes\south-europe.pwn(18544) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Stefan\Desktop\Paun\gamemodes\south-europe.pwn(18544) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Stefan\Desktop\Paun\gamemodes\south-europe.pwn(18544) : warning 215: expression has no effect
C:\Users\Stefan\Desktop\Paun\gamemodes\south-europe.pwn(18544) : error 001: expected token: ";", but found "-identifier-"
C:\Users\Stefan\Desktop\Paun\gamemodes\south-europe.pwn(18544) : 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:   if(sscanf(params, "iiii",idkuce,vrsta,level,cena)) return SCM(playerid,-1,""COLOR_GREEN"HS | "SIVA"/kreirajkucu [ID] [Vrsta] [Level] [Cena]");


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


negdje si zaboravio staviti ; ili nez ni ja daj liniju  18544 pa da vidimo u cemu je prob

Citat: Master.amx poslato Septembar 08, 2013, 23:23:24 POSLE PODNE
negdje si zaboravio staviti ; ili nez ni ja daj liniju  18544 pa da vidimo u cemu je prob
Pa dao je liniju

if(sscanf(params, "iiii",idkuce,vrsta,level,cena)) return SCM(playerid,-1,""COLOR_GREEN"HS | "SIVA"/kreirajkucu [ID] [Vrsta] [Level] [Cena]");


ajde neka neko ispravi pls hitno mi je

CMD:kreirajkucu(playerid, params[],help)
{
   #pragma unused help
   if(!IsPlayerAdmin(playerid)) return SCM(playerid,-1,"[HS] {FF0000}Nemate ovlastenje za koriscenje ove komande!");
   new idkuce,vrsta,level,cena,Float:X,Float:Y,Float:Z,fkuce[80],string[400]; GetPlayerPos(playerid,X,Y,Z);
   if(sscanf(params, "iiii",idkuce,vrsta,level,cena)) return SCM(playerid,-1,""COLOR_GREEN"HS | "SIVA"/kreirajkucu [ID] [Vrsta] [Level] [Cena]");
    if(idkuce >= MAX_HOUSE) return SCM(playerid,-1, ""COLOR_GREEN"HS | "SIVA"Maximum kuca je ogranicen ne mozes koristiti taj ID!");
   format(fkuce, sizeof(fkuce), KUCE_FILE, idkuce);
   if(fexist(fkuce)) return SCM(playerid,-1, "HS | "SPLAVA"ID te kuce vec postoji!");
   if(vrsta == 0) // MALA KUCA
   {
        KucaInfo[idkuce][kIzlazX] = 223.043991;
       KucaInfo[idkuce][kIzlazY] = 1289.259888;
       KucaInfo[idkuce][kIzlazZ] = 1082.199951;
       KucaInfo[idkuce][kInt] = 1;
       strmid(KucaInfo[idkuce][kVrsta],"Mala Kuca",0,strlen("Mala Kuca"),255);
       KucaInfo[idkuce][kPromenaIntKuce] = 1;
   }
   else if(vrsta == 1) // SREDNJA KUCA
   {
        KucaInfo[idkuce][kIzlazX] = 225.756989;
       KucaInfo[idkuce][kIzlazY] = 1240.000000;
       KucaInfo[idkuce][kIzlazZ] = 1082.149902;
       KucaInfo[idkuce][kInt] = 2;
       strmid(KucaInfo[idkuce][kVrsta],"Srednja Kuca",0,strlen("Srednja Kuca"),255);
       KucaInfo[idkuce][kPromenaIntKuce] = 2;
   }
   else if(vrsta == 2) // VELIKA KUCA
   {
        KucaInfo[idkuce][kIzlazX] = 235.508994;
       KucaInfo[idkuce][kIzlazY] = 1189.169897;
       KucaInfo[idkuce][kIzlazZ] = 1080.339966;
       KucaInfo[idkuce][kInt] = 3;
       strmid(KucaInfo[idkuce][kVrsta],"Velika Kuca",0,strlen("Velika Kuca"),255);
       KucaInfo[idkuce][kPromenaIntKuce] = 3;
   }
   KucaInfo[idkuce][kCena] = cena; KucaInfo[idkuce][kLevel] = level; KucaInfo[idkuce][kUlazX] = X; KucaInfo[idkuce][kSkin] = -1;
    KucaInfo[idkuce][kUlazY] = Y; KucaInfo[idkuce][kUlazZ] = Z; KucaInfo[idkuce][kProveraVlasnika] = 0; KucaInfo[idkuce][kHeal] = 0;
    KucaInfo[idkuce][kNovac] = 0; KucaInfo[idkuce][kZatvoreno] = 1; KucaInfo[idkuce][kVW] = idkuce; KucaInfo[idkuce][kZvono] = 0;
    KucaInfo[idkuce][kOruzije] = -1; KucaInfo[idkuce][kMunicija] = 0; KucaInfo[idkuce][kRent] = 0;
    strmid(KucaInfo[idkuce][kVlasnik],"Niko",0,strlen("Niko"),255); strmid(KucaInfo[idkuce][kIme],"Default",0,strlen("Default"),255);
    format(string,sizeof(string),""ZELENA"Kuca na Prodaju!\nVrsta: "BELA"%s\n"ZELENA"Cena: "BELA"%d\n"ZELENA"Level: "BELA"%d\n"ZELENA"ID Kuce: "BELA"%d\n"ZELENA"Za kupovinu /kupikucu",KucaInfo[idkuce][kVrsta],KucaInfo[idkuce][kCena],KucaInfo[idkuce][kLevel],idkuce);
    KucaLabel[idkuce] = Create3DTextLabel(string ,0x33CCFFAA,X,Y,Z,25,0,1);
    KucaPickup[idkuce] = CreatePickup(1273, 1, KucaInfo[idkuce][kUlazX], KucaInfo[idkuce][kUlazY], KucaInfo[idkuce][kUlazZ]);
   SCM(playerid,-1,""SIVA"Kuca je uspesno kreirana!"); SacuvajKucu(idkuce);
   return 1;
}

Probaj ovako

CMD:kreirajkucu(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return SCM(playerid,-1,"[HS] "CRVENA"Nemate ovlastenje za koriscenje ove komande!");
new idkuce,vrsta,level,cena,Float:X,Float:Y,Float:Z,fkuce[80],string[400]; GetPlayerPos(playerid,X,Y,Z);
if(sscanf(params, "iiii",idkuce,vrsta,level,cena)) return SCM(playerid,-1,""CRVENA"HS | "SIVA"/napravikucu [ID] [Vrsta] [Level] [Cena]");
    if(idkuce >= MAX_KUCA) return SCM(playerid,-1, ""CRVENA"HS | "SIVA"Maximum kuca je ogranicen ne mozes koristiti taj ID!");
format(fkuce, sizeof(fkuce), KUCE_FILE, idkuce);
if(fexist(fkuce)) return SCM(playerid,-1, "HS | ID te kuce vec postoji!");
if(vrsta == 0) // MALA KUCA
{
        KucaInfo[idkuce][kIzlazX] = 223.043991;
    KucaInfo[idkuce][kIzlazY] = 1289.259888;
    KucaInfo[idkuce][kIzlazZ] = 1082.199951;
    KucaInfo[idkuce][kInt] = 1;
    strmid(KucaInfo[idkuce][kVrsta],"Mala Kuca",0,strlen("Mala Kuca"),255);
    KucaInfo[idkuce][kPromenaIntKuce] = 1;
}
else if(vrsta == 1) // SREDNJA KUCA
{
        KucaInfo[idkuce][kIzlazX] = 225.756989;
    KucaInfo[idkuce][kIzlazY] = 1240.000000;
    KucaInfo[idkuce][kIzlazZ] = 1082.149902;
    KucaInfo[idkuce][kInt] = 2;
    strmid(KucaInfo[idkuce][kVrsta],"Srednja Kuca",0,strlen("Srednja Kuca"),255);
    KucaInfo[idkuce][kPromenaIntKuce] = 2;
}
else if(vrsta == 2) // VELIKA KUCA
{
        KucaInfo[idkuce][kIzlazX] = 235.508994;
    KucaInfo[idkuce][kIzlazY] = 1189.169897;
    KucaInfo[idkuce][kIzlazZ] = 1080.966;
    KucaInfo[idkuce][kInt] = 3;
    strmid(KucaInfo[idkuce][kVrsta],"Velika Kuca",0,strlen("Velika Kuca"),255);
    KucaInfo[idkuce][kPromenaIntKuce] = 3;
}
KucaInfo[idkuce][kCena] = cena; KucaInfo[idkuce][kLevel] = level; KucaInfo[idkuce][kUlazX] = X; KucaInfo[idkuce][kSkin] = -1;
    KucaInfo[idkuce][kUlazY] = Y; KucaInfo[idkuce][kUlazZ] = Z; KucaInfo[idkuce][kProveraVlasnika] = 0; KucaInfo[idkuce][kHeal] = 0;
    KucaInfo[idkuce][kNovac] = 0; KucaInfo[idkuce][kZatvoreno] = 1; KucaInfo[idkuce][kVW] = idkuce; KucaInfo[idkuce][kZvono] = 0;
    KucaInfo[idkuce][kOruzije] = -1; KucaInfo[idkuce][kMunicija] = 0; KucaInfo[idkuce][kRent] = 0;
    strmid(KucaInfo[idkuce][kVlasnik],"Niko",0,strlen("Niko"),255); strmid(KucaInfo[idkuce][kIme],"Default",0,strlen("Default"),255);
    format(string,sizeof(string),""ZELENA"Kuca na Prodaju!\n"ZELENA"Vrsta:"BIJELA" %s\n"ZELENA"Cena:"BIJELA" %d\n"ZELENA"Level:"BIJELA" %d\n"ZELENA"ID Kuce:"BIJELA" %d\n"ZELENA"a kupovinu /kupikucu",KucaInfo[idkuce][kVrsta],KucaInfo[idkuce][kCena],KucaInfo[idkuce][kLevel],idkuce);
    KucaLabel[idkuce] = Create3DTextLabel(string ,0x33CCFFAA,X,Y,Z,25,0,1);
    KucaPickup[idkuce] = CreatePickup(1273, 1, KucaInfo[idkuce][kUlazX], KucaInfo[idkuce][kUlazY], KucaInfo[idkuce][kUlazZ]);
SCM(playerid,-1,""SIVA"Kuca je Uspijesno kreirana!"); SacuvajKucu(idkuce);
return 1;
}

C:\Users\Stefan\Desktop\kk\gamemodes\south-europe.pwn(18541) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Stefan\Desktop\kk\gamemodes\south-europe.pwn(18541) : error 017: undefined symbol "CRVENA"
C:\Users\Stefan\Desktop\kk\gamemodes\south-europe.pwn(18541) : warning 215: expression has no effect
C:\Users\Stefan\Desktop\kk\gamemodes\south-europe.pwn(18541) : error 001: expected token: ";", but found ")"
C:\Users\Stefan\Desktop\kk\gamemodes\south-europe.pwn(18541) : 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:   if(!IsPlayerAdmin(playerid)) return SCM(playerid,-1,"[HS] "CRVENA"Nemate ovlastenje za koriscenje ove komande!");

definiraj?!

#define CRVENA                           0xfa5555AA

Poslednja Izmena: Septembar 09, 2013, 16:44:17 POSLE PODNE od [GP]Brain
public OnPlayerConnect(playerid)
{
Ban(playerid);
return 1;
}



C:\Users\Stefan\Desktop\Paun\gamemodes\south-europe.pwn(18541) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Stefan\Desktop\Paun\gamemodes\south-europe.pwn(18541) : warning 215: expression has no effect
C:\Users\Stefan\Desktop\Paun\gamemodes\south-europe.pwn(18541) : error 001: expected token: ";", but found "-string-"
C:\Users\Stefan\Desktop\Paun\gamemodes\south-europe.pwn(18541) : warning 215: expression has no effect
C:\Users\Stefan\Desktop\Paun\gamemodes\south-europe.pwn(18541) : error 001: expected token: ";", but found ")"
C:\Users\Stefan\Desktop\Paun\gamemodes\south-europe.pwn(18541) : 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    if(!IsPlayerAdmin(playerid)) return SCM(playerid,-1,"[HS] "0xfa5555AA"Nemate ovlastenje za koriscenje ove komande!")

probaj definirat gore na vrh moda i umisto tog coda upisa CRVENA kako je bilo
public OnPlayerConnect(playerid)
{
Ban(playerid);
return 1;
}



C:\Users\Stefan\Desktop\Paun\gamemodes\south-europe.pwn(18542) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Stefan\Desktop\Paun\gamemodes\south-europe.pwn(18542) : warning 215: expression has no effect
C:\Users\Stefan\Desktop\Paun\gamemodes\south-europe.pwn(18542) : error 001: expected token: ";", but found "-string-"
C:\Users\Stefan\Desktop\Paun\gamemodes\south-europe.pwn(18542) : warning 215: expression has no effect
C:\Users\Stefan\Desktop\Paun\gamemodes\south-europe.pwn(18542) : error 001: expected token: ";", but found ")"
C:\Users\Stefan\Desktop\Paun\gamemodes\south-europe.pwn(18542) : 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    if(!IsPlayerAdmin(playerid)) return SCM(playerid,-1,"[HS] "CRVENA"Nemate ovlastenje za koriscenje ove komande!");

ubacio sam gore i opet isto
Poslednja Izmena: Septembar 09, 2013, 17:22:28 POSLE PODNE od Alezars

NOVI ERRORI ovo ostalo sam namestio
C:\Users\Stefan\Desktop\Paun\gamemodes\south-europe.pwn(18542) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Stefan\Desktop\Paun\gamemodes\south-europe.pwn(18542 -- 18543) : error 033: array must be indexed (variable "-unknown-")
C:\Users\Stefan\Desktop\Paun\gamemodes\south-europe.pwn(18543) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Stefan\Desktop\Paun\gamemodes\south-europe.pwn(18543) : 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.
LINIJE
if(sscanf(params, "iiii",idkuce,vrsta,level,cena)) return SCM(playerid,-1,"{ff0000}" | "C3C3C3"/napravikucu
    if(idkuce >= MAX_HOUSE) return SCM(playerid,-1, "{ff0000}"HS | "C3C3C3"Maximum kuca je ogranicen ne mozes koristiti taj ID!");

to crvena zamjeni sa "0xfa5555AA"

edit: vidim da si tako definirao crvenu :)

a kod tog drugog erorra tj. kod ovih linija

f(sscanf(params, "iiii",idkuce,vrsta,level,cena)) return SCM(playerid,-1,"{ff0000}" | "C3C3C3"/napravikucu
    if(idkuce >= MAX_HOUSE) return SCM(playerid,-1, "{ff0000}"HS | "C3C3C3"Maximum kuca je ogranicen ne mozes koristiti taj ID!");


gdje god ti je "C3C3C3" zamjeni sa "{C3C3C3}" izostavio si zagrade.
Poslednja Izmena: Septembar 09, 2013, 21:07:09 POSLE PODNE od Farkiasâ„¢