Balkan SA:MP

PAWN skriptanje, gamemodovi, filterskripte, include fajlovi, mape, pluginovi => Razgovor u vezi PAWN - skriptanja => Temu započeo: AjdiNNN poslato Januar 19, 2016, 19:09:56 POSLE PODNE

Naslov: [Pomoc] Å ta mi fali :D
Poruka od: AjdiNNN poslato Januar 19, 2016, 19:09:56 POSLE PODNE
Skripta koju koristim:Moja CnR
Detaljan opis problema:Pa errori gdje mi fali {} ili ne znam sta je onda
Dio skripte:C:\Users\AjdiN\Desktop\CCNR\CNRSF\pawno\include\cnr/garage.inc(96) : error 029: invalid expression, assumed zero
C:\Users\AjdiN\Desktop\CCNR\CNRSF\pawno\include\cnr/garage.inc(97) : warning 217: loose indentation
C:\Users\AjdiN\Desktop\CCNR\CNRSF\pawno\include\cnr/garage.inc(100) : error 010: invalid function or declaration
C:\Users\AjdiN\Desktop\CCNR\CNRSF\pawno\include\cnr/garage.inc(290) : error 029: invalid expression, assumed zero
C:\Users\AjdiN\Desktop\CCNR\CNRSF\pawno\include\cnr/garage.inc(291) : warning 217: loose indentation
C:\Users\AjdiN\Desktop\CCNR\CNRSF\pawno\include\cnr/garage.inc(294) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.

COMMAND:sellgarageto(playerid, params[])
{
new id;
new idp;
new ammount;
if(sscanf(params, "uid", idp, ammount, id))
{
Usage(playerid, "sellgarageto <id player> <ammount> <idgarage>");
}
else
{
if(Player[idp][garageo] == 0)
{
if(IsPlayerInDynamicCP(idp, Garage[id][garageCP]) && IsPlayerInDynamicCP(playerid, Garage[id][garageCP]))
{
    if(Garage[id][garageOwner]==Player[playerid][pID])
{
if(Player[idp][playerMoney] >= ammount)
{
new msg[512];
takeMoney(idp, 500000);
Garage[id][garageOwner] = Player[idp][pID];
format(msg, sizeof(msg), CHAT_INFO"[PRESS Y TO ENTER]\n"CHAT_WHITE"ID : "CHAT_YELLOW"%d"CHAT_WHITE"\nLocation : "CHAT_YELLOW"%s\n"CHAT_WHITE"Owner :"CHAT_YELLOW" %s", Garage[id][garageID], GetXY2DZone(Garage[id][garageXYZ][0], Garage[id][garageXYZ][1]), GetName(playerid));
DestroyDynamic3DTextLabel(Garage[id][garageLabel]);
Server(idp, "Use /exitgarage to exit garage. Use /sellgarage to sell garage. Use /lockgarage to lock garage");
Garage[id][garageLabel] = CreateDynamic3DTextLabel(msg, COLOR_WHITE, Garage[id][garageXYZ][0], Garage[id][garageXYZ][1], Garage[id][garageXYZ][2] + 0.5, 10.0);
mysql_format(koneksi, msg, sizeof(msg), "UPDATE `garage` SET `owner` = '%d' where `id` = '%d'", Garage[id][garageOwner], Garage[id][garageID]);
mysql_format(koneksi, msg, sizeof(msg), "UPDATE `player` SET `garageo` = '1' where `id` = '%d'", Garage[id][garageOwner]);
mysql_format(koneksi, msg, sizeof(msg), "UPDATE `player` SET `garageo` = '0' where `id` = '%d'", Player[playerid][pID]);
mysql_query(koneksi, msg, false);
}
else
{
Server(idp, "You didn't have enough money to buy garage.");
}
}
else
{
Server(playerid, "You don't own this garage");
}
}
else
{
Server(playerid, "You must be in garage checkpoint to buy/sell garage.");
}
}
else
}
Server(idp, "You can't own more than one garage(only donator can own more garages)");
}
}
return 1;
}

COMMAND:buygarage(playerid, params[])
{
new id;
if(sscanf(params, "d", id))
{
Usage(playerid, "buygarage <garage id>");
}
else
{
if(Player[playerid][garageo] == 0)
{
if(IsPlayerInDynamicCP(playerid, Garage[id][garageCP]))
{
if(Player[playerid][playerMoney] >= 500000)
{
new msg[512];
takeMoney(playerid, 500000);
Garage[id][garageOwner] = Player[playerid][pID];
format(msg, sizeof(msg), CHAT_INFO"[PRESS Y TO ENTER]\n"CHAT_WHITE"ID : "CHAT_YELLOW"%d"CHAT_WHITE"\nLocation : "CHAT_YELLOW"%s\n"CHAT_WHITE"Owner :"CHAT_YELLOW" %s", Garage[id][garageID], GetXY2DZone(Garage[id][garageXYZ][0], Garage[id][garageXYZ][1]), GetName(playerid));
DestroyDynamic3DTextLabel(Garage[id][garageLabel]);
Server(playerid, "Use /exitgarage to exit garage. Use /sellgarage to sell garage. Use /lockgarage to lock garage");
Garage[id][garageLabel] = CreateDynamic3DTextLabel(msg, COLOR_WHITE, Garage[id][garageXYZ][0], Garage[id][garageXYZ][1], Garage[id][garageXYZ][2] + 0.5, 10.0);
mysql_format(koneksi, msg, sizeof(msg), "UPDATE `garage` SET `owner` = '%d' where `id` = '%d'", Garage[id][garageOwner], Garage[id][garageID]);
mysql_format(koneksi, msg, sizeof(msg), "UPDATE `player` SET `garageo` = '1' where `id` = '%d'", Player[playerid][pID]);
mysql_query(koneksi, msg, false);
}
else
{
Server(playerid, "You didn't have enough money to buy garage.");
}
}
else
{
Server(playerid, "You must be in garage checkpoint to buy garage.");
}
}
else
}
Server(playerid, "You can't own more than one garage.Only donator can own more garages");
}
}
return 1;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno):
Naslov: Odg: [Pomoc] Å ta mi fali :D
Poruka od: LAVendeta poslato Januar 19, 2016, 20:04:49 POSLE PODNE
Daj mi linije na kojima ti to izbacuje
Naslov: Odg: [Pomoc] Å ta mi fali :D
Poruka od: AjdiNNN poslato Januar 19, 2016, 20:49:19 POSLE PODNE
else
}- na ovoj
Server(playerid, "You can't own more than one garage.Only donator can own more garages");
}
}
return 1; - na ovoj
}

else
}- na ovoj
Server(idp, "You can't own more than one garage(only donator can own more garages)");
}
}
return 1;- na ovoj
}
Naslov: Odg: [Pomoc] Å ta mi fali :D
Poruka od: LAVendeta poslato Januar 20, 2016, 10:42:57 PRE PODNE
Ovo kad saljes poruku i upises Server nemoze tako.
Ako si vec definisao gore SendClientMessage kao Server onda ti fali i boja.
Ae stavi ovako:[pawn]Server(playerid, 0xFFFFFF, "You can't own more than one garage.Only donator can own more garage");[/pawn]
Naslov: Odg: [Pomoc] Å ta mi fali :D
Poruka od: AjdiNNN poslato Januar 21, 2016, 20:09:54 POSLE PODNE
ma nije to je moja funckija radi tako nije do tog, a i rijesio sam mozete lock
Naslov: Odg: [Pomoc] Å ta mi fali :D
Poruka od: [CH]Lenon poslato Januar 21, 2016, 21:33:15 POSLE PODNE
else
{
Server(playerid, "You can't own more than one garage.Only donator can own more garages");
}
}
return 1;
}