[POMOC]Rent Car Skripta

Započeo Nadroj, Mart 05, 2013, 17:53:24 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

skriptu koju koristim: moja
opis problema: errors

eh ovako... imam rentcar filescriptu koju sam sam kreirao ali imam i neke errore... moze li mi neko pomoci

/*
_______________________________
|                             |
|       Rent A Car v1.0.0     |
|    last update 05.03.2013.  |
| FileScript by Monkey D Luffy|
|_____________________________|
*/
//========================================
#include <a_samp>
#include <zcmd>
//========================================
new Rent [13];
new Rentano[MAX_PLAYERS];
//========================================
forward RentVozila(carid)
//========================================
#pragma tabsize 0
//========================================
Rent[1] = AddStaticVehicle(451,1627.0424,-1037.2556,23.6063,179.2299,42,42); //
Rent[2] = AddStaticVehicle(451,1631.8392,-1037.3732,23.6039,179.1817,42,42); //
Rent[3] = AddStaticVehicle(451,1636.1553,-1037.1351,23.6044,179.3599,42,42); //
Rent[4] = AddStaticVehicle(451,1640.4515,-1037.6293,23.6062,182.2420,42,42); //
Rent[5] = AddStaticVehicle(541,1644.9778,-1037.6134,23.5234,183.9341,42,42); //
Rent[6] = AddStaticVehicle(541,1649.9692,-1037.9568,23.5233,183.5951,42,42); //
Rent[7] = AddStaticVehicle(541,1654.4149,-1037.9500,23.5235,177.5819,42,42); //
Rent[8] = AddStaticVehicle(541,1658.4449,-1037.0322,23.5235,184.8689,42,42); //
Rent[9] = AddStaticVehicle(507,1627.4287,-1046.6598,23.7229,356.9503,42,42); //
Rent[10] = AddStaticVehicle(507,1631.6801,-1046.6694,23.7224,356.5471,42,42); //
Rent[11] = AddStaticVehicle(507,1636.1953,-1046.1918,23.7235,352.5952,42,42); //
Rent[12] = AddStaticVehicle(507,1640.4165,-1046.7714,23.7225,355.9119,42,42); //

//========================================
public RentVozila(carid)
{
for(new i = 0; i < sizeof(Rent); i++)
{
    if(card == Rent<i>)
}
}
//========================================
CMD:rentaj(playerid,params[])
{
    new string[128];
    if (GetPlayerMoney(playerid) < 200)// ako igrac nema 200$ nemoze da rent
    {
        SendClientMessage(playerid, 0xFF00FF, "Nemas dovoljno Novca!");
        return 1;
}
if(Rentano[playerid] != 299)//proverava da li igrac vec renta neko vozilo
{
    SendClientMessage(playerid, 0xFF00FF, "Moras prvo da vratis iznajmljeno vozilo!");
    return 1;
}
for(new i=0; i<MAX_PLAYERS; i++>
{
    if(Rentano<i> == GetPlayerVehicleID(playerid))//ako je vec neko rent vozilo, drugi igrac nemoze da renta isto
    {
        SendClientMessage(playerid, 0xFF00FF, "Neko je vec iznajmio ovo vozilo.");
        return 1;
}
}
GivePlayerMoney(playerid, -200);//oduzima igracu 200$
Rentano[playerid] = GetPlayerVehicleID(playerid);//postavlja na vozilo da niko nemoze da ga rent posto je vec neko rentovao
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0)// pusta neke zvuke
format(string, sizeof(string)), "~r~/unrentcar~n~~g~/lock.");//ispisuje poruku igracu
SendClientMessage(playerid, 0xFF00FF, "Prijatan dan!")
      TogglePlayerControllable(playerid, 1);// omogucava igracu 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, 0xFF00FF, "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;
    }
  }
}
}
//========================================



a evo i errora
C:\Users\petarwin7\Desktop\Grand Line\filterscripts\RC.pwn(20) : error 001: expected token: ";", but found "-identifier-"
C:\Users\petarwin7\Desktop\Grand Line\filterscripts\RC.pwn(38) : error 017: undefined symbol "card"
C:\Users\petarwin7\Desktop\Grand Line\filterscripts\RC.pwn(39) : error 029: invalid expression, assumed zero
C:\Users\petarwin7\Desktop\Grand Line\filterscripts\RC.pwn(42) : error 029: invalid expression, assumed zero
C:\Users\petarwin7\Desktop\Grand Line\filterscripts\RC.pwn(42) : error 017: undefined symbol "cmd_rentaj"
C:\Users\petarwin7\Desktop\Grand Line\filterscripts\RC.pwn(42) : error 029: invalid expression, assumed zero
C:\Users\petarwin7\Desktop\Grand Line\filterscripts\RC.pwn(42) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


7 Errors.
BIG RESPECT JOEY_
BIG RESPECT [BD] Mr.Gagi

BIG RESPECT David A.k.A Sabljak

Iako se nerazumijem u skriptanje al mislim da moras definirat card :D

hmmmm upravu si xD


ali sta cu sa ostalim errorima
BIG RESPECT JOEY_
BIG RESPECT [BD] Mr.Gagi

BIG RESPECT David A.k.A Sabljak

ma kakvo me definisanje spopalo.... tu je trebalo da stoji carid ne card... izostavio sam i xD
BIG RESPECT JOEY_
BIG RESPECT [BD] Mr.Gagi

BIG RESPECT David A.k.A Sabljak

buduci da sam ja nesto izmenjao i i obrisao sam to forward RentVozila(carid); i  dosam na ove errore


sveo sam jos na ove errore

C:\Users\petarwin7\Desktop\Grand Line\filterscripts\RC.pwn(20) : error 001: expected token: ";", but found "-identifier-"
C:\Users\petarwin7\Desktop\Grand Line\filterscripts\RC.pwn(37) : error 012: invalid function call, not a valid address
C:\Users\petarwin7\Desktop\Grand Line\filterscripts\RC.pwn(37) : warning 215: expression has no effect
C:\Users\petarwin7\Desktop\Grand Line\filterscripts\RC.pwn(37) : error 001: expected token: ";", but found ")"
C:\Users\petarwin7\Desktop\Grand Line\filterscripts\RC.pwn(37) : error 029: invalid expression, assumed zero
C:\Users\petarwin7\Desktop\Grand Line\filterscripts\RC.pwn(37) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


5 Errors.



evo deo skripte gde se oni nalaze

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if (Rentano(vehicleid))// ovo je 37 red
{
GameTextForPlayer(playerid, "This Vehicle is For Rent, Type /rentcar to rent it", 3000, 4);
}
return 1;
}


i obrisao sam to forward RentVozila(carid);
BIG RESPECT JOEY_
BIG RESPECT [BD] Mr.Gagi

BIG RESPECT David A.k.A Sabljak