08.06.2013, 14:26
ERROR
LINE 40
here is all i done
WHAT's WRONG ? HELP ME
Код:
C:\Documents and Settings\Корисник\Desktop\FreakWorld RPG Macedonia\filterscripts\RentBike.pwn(40) : error 017: undefined symbol "RentBike" C:\Documents and Settings\Корисник\Desktop\FreakWorld RPG Macedonia\filterscripts\RentBike.pwn(40) : warning 215: expression has no effect C:\Documents and Settings\Корисник\Desktop\FreakWorld RPG Macedonia\filterscripts\RentBike.pwn(40) : error 001: expected token: ";", but found "]" C:\Documents and Settings\Корисник\Desktop\FreakWorld RPG Macedonia\filterscripts\RentBike.pwn(40) : error 029: invalid expression, assumed zero C:\Documents and Settings\Корисник\Desktop\FreakWorld RPG Macedonia\filterscripts\RentBike.pwn(40) : fatal error 107: too many error messages on one line
Код:
RentBike[1] = AddStaticVehicleEx(462,1671.5101,-1892.7987,13.1449,89.0272,0,0,3600); // 187
Код:
//---------------// forward RentBike(carid) //--------------// new Rentano[MAX_PLAYERS]; new RentBike[25]; //-------------//
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { CMD:rentaj(playerid,params[]) { new string[128]; if (GetPlayerMoney(playerid) < 150)//Ako igrac nema 150 $, nece moci da renta. { SendClientMessage(playerid, COLOR_GRAD2, "Nemas dovoljno Novca!"); return 1; } if(Rentano[playerid] != 299)//Proverava da li vec imas rentano vozilo. { SendClientMessage(playerid, SIVA, "Moras prvo da vratis iznajmljeno vozilo."); return 1; } for(new i=0; i<MAX_PLAYERS; i++) { if(Rentano<i> == GetPlayerVehicleID(playerid))//Ako je neko rentao vozilo, neces ga moci rentati { SendClientMessage(playerid, SIVA, "Neko je vec rentao ovo vozilo."); return 1; } GivePlayerMoney(playerid,-150);//Oduzima igracu 150$ Rentano[playerid] = GetPlayerVehicleID(playerid);//Postavlja igracu rent vozilo(da drugi nmg rentati) PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);// Pusta neke zvuke... format(string, sizeof(string), "~r~/unrentcar~n~~g~/lock.");//Tekst koji ce biti u GameTextu SendClientMessage(playerid, ZUTA, "Prijatan dan!");// ispisuje poruku igracu TogglePlayerControllable(playerid, 1);//Odmrzava igraca - Omogucava mu da se krece GameTextForPlayer(playerid, string, 5000, 3);// Prikazuje GameText return 1; } } CMD:unrentaj(playerid,params[]) { new idcar = GetPlayerVehicleID(playerid); if(Rentano[playerid] != 299) { if(idcar == Rentano[playerid]) { TogglePlayerControllable(playerid, 1); } SetVehicleToRespawn(Rentano[playerid]); Rentano[playerid] = 299; SendClientMessage(playerid,CRVENA,"Vratio si iznajmljeno vozilo!"); } return 1; }
Код:
public OnPlayerStateChange(playerid, newstate, oldstate) { if(newstate == 2) { if(RentVozila(newcar)) { if (Rentano[playerid] != newcar) { SendClientMessage(playerid,ZELENA,"========== RENT VOZILO =========="); SendClientMessage(playerid,LJUBICASTA,"Da rentas: /rentcar ."); SendClientMessage(playerid,LJUBICASTA,"Da izadjes: /exitcar ."); TogglePlayerControllable(playerid, 0);// Freeza igraca, da ne moze da pobegne PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0); } else { return 1; } } } return 1; }
Код:
public RentBike(carid) { for(new i = 0; i < sizeof(Rent); i++) { if(carid == Rent<i>) return 1; } return 0; }</i>