Detaljan opis problema: Pozdrav svima..Nasao sam neku stranu komandu /deliver i sad pokusavam da je prilagodim modu uspeo sam neke stvari da uradim ali sad mi izbacuje 5 errora i ja ne mogu resiti nikako...Nemam jos nekog velikog iskustva u ovome pa ako neko iskusniji moze da mi pomogne? Hvala svima od srca..🙂
Dio skripte:
CMD:materials(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo != 18)
{
SendClientMessage(playerid,COLOR_GREY," *Niste diler oruzija!");
return 1;
}
new x_nr;
if(!strlen(x_nr)) {
SendClientMessage(playerid, COLOR_WHITE, "Koristite: /materials [ime radnje]");
SendClientMessage(playerid, COLOR_WHITE, "Dostupna imena: Get, Deliver.");
return 1;
}
if(strcmp(x_nr,"get",true) == 0)
{
if(PlayerToPoint(3.0,playerid,597.1277,-1248.6479,18.2734))
{
if(MatsHolding >= 10)
{
SendClientMessage(playerid, COLOR_GREY, " You can't hold any more Materials Packages !");
return 1;
}
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /materials get ");
return 1;
}
new idx,tmp;
new string;
new moneys = strval(tmp);
if(moneys < 1 || moneys > 10) { SendClientMessage(playerid, COLOR_GREY, " Package Number can't be below 1 or higher then 10 !"); return 1; }
new price = moneys * 100;
if(GetPlayerMoney(playerid) > price)
{
format(string, sizeof(string), "* You bought %d Materials Packages for $%d.", moneys, price);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
GivePlayerMoney(playerid, - price);
MatsHolding = moneys;
}
else
{
format(string, sizeof(string), " You can't afford the $%d !", price);
SendClientMessage(playerid, COLOR_GREY, string);
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You are not at the Materials Package Building in Los Santos !");
return 1;
}
}
else if(strcmp(x_nr,"deliver",true) == 0)
{
if(PlayerToPoint(3.0,playerid,-2119.5469,-178.5679,35.3203))
{
if(MatsHolding > 0)
{
new payout = (50), (MatsHolding);
format(string, sizeof(string), "* The Factory gave you %d Materials for your %d Materials Packages.", payout, MatsHolding);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
PlayerInfo += payout;
MatsHolding = 0;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You don't have any Materials Packages !");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You are not at the Materials Factory in San Fierro !");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Invalid Materials Name !");
return 1;
}
}
return 1;
}Neke slike/video za lakse dobivanje pomoci(neobavezno): //
Evo errori
undefined symbol "x_nr" Linija: else if(strcmp(x_nr,"deliver",true) == 0)
expected token: "-identifier-", but found "(" Linija: new payout = (50), (MatsHolding);
error 017: undefined symbol "string"
undefined symbol "string"
invalid expression, assumed zero
fatal error 107: too many error messages on one line ova zadnja 4 errora su ova linija: format(string, sizeof(string), "* The Factory gave you %d Materials for your %d Materials Packages.", payout, MatsHolding);
