[POMOC] KOMANDA

Započeo Arkoo
11. Okt. 2015. Zaključano
860
pregleda
11
postova
Arkoo
5
Underboss
11. Okt. 2015.
Skripta koju koristim:BE:RP
Detaljan opis problema:
(43786) : error 029: invalid expression, assumed zero
(43786) : warning 215: expression has no effect
(43786) : error 001: expected token: ";", but found "if"
(43799) : error 029: invalid expression, assumed zero
(43799) : warning 215: expression has no effect
(43799) : error 001: expected token: ";", but found "if"
(43810) : error 001: expected token: "-string end-", but found "-identifier-"
(43810) : error 029: invalid expression, assumed zero
(43810) : warning 215: expression has no effect
(43810) : error 001: expected token: ";", but found "-identifier-"
(43810) : fatal error 107: too many error messages on one line

Dio skripte:
YCMD:ctprodaj(playerid, params[], help)
{
#pragma unused help
#pragma unused params
if(UlogovanProvera == 0) return SCM(playerid,-1,""SIVA"ERROR: "BELA"Moras se ulogovati da bi koristio ovu komandu!");
if(!IsPlayerInRangeOfPoint(playerid, 2.0, 2745.19702,-2453.55933,13.67110)) return SCM(playerid, -1, "BE:RP | "CRVENA"Niste kod crnog trzista!");
    {
    if(PlayerInfo == 0)
    {
new string;
PlayerInfo = 0;
g_NovacPlus(playerid, 10000);
format(string, sizeof(string), ""CRVENA" BE:RP | "BELA"Prodano za $10000.",GetName(playerid));
SendClientMessage(playerid, COLOR_WHITE, string);
SavePlayer(playerid);
}
else
{
  SCM(playerid, 0xC3C3C3FF, ""BELA"["CRVENA"B"SPLAVA"E"BELA"] "BELA"Nemate narukvice!");
}
43786 else if(PlayerInfo == 0)
    {
    new string;
PlayerInfo = 0;
g_NovacPlus(playerid, 10000);
format(string, sizeof(string), ""CRVENA" BE:RP | "BELA"Prodano za $10000.",GetName(playerid));
SendClientMessage(playerid, COLOR_WHITE, string);
SavePlayer(playerid);
}
else
    {
  SCM(playerid, 0xC3C3C3FF, ""BELA"["CRVENA"B"SPLAVA"E"BELA"] "BELA"Nemate Ogrlice!");
    }
(43799)    else if(PlayerInfo == 0)
{
new string;
PlayerInfo = 0;
g_NovacPlus(playerid, 15000);
format(string, sizeof(string), ""CRVENA" BE:RP | "BELA"Prodano za $15000.",GetName(playerid));
SendClientMessage(playerid, COLOR_WHITE, string);
SavePlayer(playerid);
    }
else
{
(43810) SCM(playerid, 0xC3C3C3FF, ""BELA"["CRVENA"B"SPLAVA"E"BELA] "BELA"Nemate dokumenta!");
    }
    else if(PlayerInfo == 0)
    {
    new string;
PlayerInfo = 0;
g_NovacPlus(playerid, 15000);
format(string, sizeof(string), ""CRVENA" BE:RP | "BELA"Prodano za $15000.",GetName(playerid));
SendClientMessage(playerid, COLOR_WHITE, string);
SavePlayer(playerid);
}
else
{
  SCM(playerid, 0xC3C3C3FF, ""BELA"["CRVENA"B"SPLAVA"E"BELA] "BELA"Nemate diplome!");
}
}
return 1;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno):
Vodka Play
5
Legenda Foruma
11. Okt. 2015.
Posle else, ne može da ide else if. else pokriva sve uslove koji ne spadaju pod prethodne if-elif...
YCMD:ctprodaj(playerid, params[], help)
{
#pragma unused help
#pragma unused params
if(UlogovanProvera == 0) return SCM(playerid,-1,""SIVA"ERROR: "BELA"Moras se ulogovati da bi koristio ovu komandu!");
if(!IsPlayerInRangeOfPoint(playerid, 2.0, 2745.19702,-2453.55933,13.67110)) return SCM(playerid, -1, "BE:RP | "CRVENA"Niste kod crnog trzista!");
{
if(PlayerInfo == 0)
{
new string;
PlayerInfo = 0;
g_NovacPlus(playerid, 10000);
format(string, sizeof(string), ""CRVENA" BE:RP | "BELA"Prodano za $10000.",GetName(playerid));
SendClientMessage(playerid, COLOR_WHITE, string);
SavePlayer(playerid);
}
else
{
SCM(playerid, 0xC3C3C3FF, ""BELA"["CRVENA"B"SPLAVA"E"BELA"] "BELA"Nemate narukvice!");
}
if(PlayerInfo == 0)
{
new string;
PlayerInfo = 0;
g_NovacPlus(playerid, 10000);
format(string, sizeof(string), ""CRVENA" BE:RP | "BELA"Prodano za $10000.",GetName(playerid));
SendClientMessage(playerid, COLOR_WHITE, string);
SavePlayer(playerid);
}
else
{
SCM(playerid, 0xC3C3C3FF, ""BELA"["CRVENA"B"SPLAVA"E"BELA"] "BELA"Nemate Ogrlice!");
}
if(PlayerInfo == 0)
{
new string;
PlayerInfo = 0;
g_NovacPlus(playerid, 15000);
format(string, sizeof(string), ""CRVENA" BE:RP | "BELA"Prodano za $15000.",GetName(playerid));
SendClientMessage(playerid, COLOR_WHITE, string);
SavePlayer(playerid);
}
else
{
SCM(playerid, 0xC3C3C3FF, ""BELA"["CRVENA"B"SPLAVA"E"BELA] "BELA"Nemate dokumenta!");
}
if(PlayerInfo == 0)
{
new string;
PlayerInfo = 0;
g_NovacPlus(playerid, 15000);
format(string, sizeof(string), ""CRVENA" BE:RP | "BELA"Prodano za $15000.",GetName(playerid));
SendClientMessage(playerid, COLOR_WHITE, string);
SavePlayer(playerid);
}
else
{
SCM(playerid, 0xC3C3C3FF, ""BELA"["CRVENA"B"SPLAVA"E"BELA] "BELA"Nemate diplome!");
}
}
return 1;
}
Arkoo
5
Underboss
11. Okt. 2015.
Danke!! LOCK
Arkoo
5
Underboss
11. Okt. 2015.
compiluje mod sve ok ali u igri i ako nemam ogrlice, narukvice prodaje
Vodka Play
5
Legenda Foruma
11. Okt. 2015.
Jer si stavio da prodaje ako je == 0  😄 Nisam to ni gledao, tražio sam sintaksne greÅ¡ke, a ne logičke..
YCMD:ctprodaj(playerid, params[], help)
{
#pragma unused help
#pragma unused params
if(UlogovanProvera == 0) return SCM(playerid,-1,""SIVA"ERROR: "BELA"Moras se ulogovati da bi koristio ovu komandu!");
if(!IsPlayerInRangeOfPoint(playerid, 2.0, 2745.19702,-2453.55933,13.67110)) return SCM(playerid, -1, "BE:RP | "CRVENA"Niste kod crnog trzista!");
{
if(PlayerInfo > 0)
{
new string;
PlayerInfo = 0;
g_NovacPlus(playerid, 10000);
format(string, sizeof(string), ""CRVENA" BE:RP | "BELA"Prodano za $10000.",GetName(playerid));
SendClientMessage(playerid, COLOR_WHITE, string);
SavePlayer(playerid);
}
else
{
SCM(playerid, 0xC3C3C3FF, ""BELA"["CRVENA"B"SPLAVA"E"BELA"] "BELA"Nemate narukvice!");
}
if(PlayerInfo > 0)
{
new string;
PlayerInfo = 0;
g_NovacPlus(playerid, 10000);
format(string, sizeof(string), ""CRVENA" BE:RP | "BELA"Prodano za $10000.",GetName(playerid));
SendClientMessage(playerid, COLOR_WHITE, string);
SavePlayer(playerid);
}
else
{
SCM(playerid, 0xC3C3C3FF, ""BELA"["CRVENA"B"SPLAVA"E"BELA"] "BELA"Nemate Ogrlice!");
}
if(PlayerInfo > 0)
{
new string;
PlayerInfo = 0;
g_NovacPlus(playerid, 15000);
format(string, sizeof(string), ""CRVENA" BE:RP | "BELA"Prodano za $15000.",GetName(playerid));
SendClientMessage(playerid, COLOR_WHITE, string);
SavePlayer(playerid);
}
else
{
SCM(playerid, 0xC3C3C3FF, ""BELA"["CRVENA"B"SPLAVA"E"BELA] "BELA"Nemate dokumenta!");
}
if(PlayerInfo > 0)
{
new string;
PlayerInfo = 0;
g_NovacPlus(playerid, 15000);
format(string, sizeof(string), ""CRVENA" BE:RP | "BELA"Prodano za $15000.",GetName(playerid));
SendClientMessage(playerid, COLOR_WHITE, string);
SavePlayer(playerid);
}
else
{
SCM(playerid, 0xC3C3C3FF, ""BELA"["CRVENA"B"SPLAVA"E"BELA] "BELA"Nemate diplome!");
}
}
return 1;
}
Arkoo
5
Underboss
11. Okt. 2015.
Vodka Play wrote on October 11, 2015, 6:46 pm:
Jer si stavio da prodaje ako je == 0  😄 Nisam to ni gledao, tražio sam sintaksne greÅ¡ke, a ne logičke..
YCMD:ctprodaj(playerid, params[], help)
{
#pragma unused help
#pragma unused params
if(UlogovanProvera == 0) return SCM(playerid,-1,""SIVA"ERROR: "BELA"Moras se ulogovati da bi koristio ovu komandu!");
if(!IsPlayerInRangeOfPoint(playerid, 2.0, 2745.19702,-2453.55933,13.67110)) return SCM(playerid, -1, "BE:RP | "CRVENA"Niste kod crnog trzista!");
{
if(PlayerInfo > 0)
{
new string;
PlayerInfo = 0;
g_NovacPlus(playerid, 10000);
format(string, sizeof(string), ""CRVENA" BE:RP | "BELA"Prodano za $10000.",GetName(playerid));
SendClientMessage(playerid, COLOR_WHITE, string);
SavePlayer(playerid);
}
else
{
SCM(playerid, 0xC3C3C3FF, ""BELA"["CRVENA"B"SPLAVA"E"BELA"] "BELA"Nemate narukvice!");
}
if(PlayerInfo > 0)
{
new string;
PlayerInfo = 0;
g_NovacPlus(playerid, 10000);
format(string, sizeof(string), ""CRVENA" BE:RP | "BELA"Prodano za $10000.",GetName(playerid));
SendClientMessage(playerid, COLOR_WHITE, string);
SavePlayer(playerid);
}
else
{
SCM(playerid, 0xC3C3C3FF, ""BELA"["CRVENA"B"SPLAVA"E"BELA"] "BELA"Nemate Ogrlice!");
}
if(PlayerInfo > 0)
{
new string;
PlayerInfo = 0;
g_NovacPlus(playerid, 15000);
format(string, sizeof(string), ""CRVENA" BE:RP | "BELA"Prodano za $15000.",GetName(playerid));
SendClientMessage(playerid, COLOR_WHITE, string);
SavePlayer(playerid);
}
else
{
SCM(playerid, 0xC3C3C3FF, ""BELA"["CRVENA"B"SPLAVA"E"BELA] "BELA"Nemate dokumenta!");
}
if(PlayerInfo > 0)
{
new string;
PlayerInfo = 0;
g_NovacPlus(playerid, 15000);
format(string, sizeof(string), ""CRVENA" BE:RP | "BELA"Prodano za $15000.",GetName(playerid));
SendClientMessage(playerid, COLOR_WHITE, string);
SavePlayer(playerid);
}
else
{
SCM(playerid, 0xC3C3C3FF, ""BELA"["CRVENA"B"SPLAVA"E"BELA] "BELA"Nemate diplome!");
}
}
return 1;
}

Ja sam vidio tu gresku i promjenio u == 1 i radi samo sto izbaciva tekst od ostalih npr: imam narukvicu i prodam narukvicu pise Prodali ste narukvicu pa ispod ispisuje nemate ogrlicu nemate dokument nemate diplomu... sad cu da vidim sa > kako ce biti
Arkoo
5
Underboss
11. Okt. 2015.
Radi i ovako kao sto si rekao nego izbacuje mi ovo http://imgur.com/0cgSSqy kako da to rijesim
Amar Tinjak
4
Enforcer
11. Okt. 2015.
Na ovaj način provjere ne možeš uraditi.

Pošto mu provjeri sve, šalje poruku za svaki taj. Uradi preko sscanfa ili na neki drugi način.
Vodka Play
5
Legenda Foruma
11. Okt. 2015.
Odradi drugačije komandu, došao si ti pomognemo oko greške, ne da skriptamo za tebe. Napravi da bira šta želi da proda..
Arkoo
5
Underboss
11. Okt. 2015.
Napravio sam. dodao sam na kraju da ispisuje Nemate nista kod sebe 🙂 a ono nemate ogrlicu/narukvicu/dokument...... obrisao moze KATANAC
Vodka Play
5
Legenda Foruma
11. Okt. 2015.
Super 🙂

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha