Peršokti į turinį
Steal

Error meta padekit

Recommended Posts

Sveiki, sienden dejau i kuriama gm /tpm /remont ir /cparduoti ir pns...

bet meta error aptis pasiziurekit

C:\Documents and Settings\pukissebas.HATA-10A8A7683A\Desktop\Domanto failiukai\GRP4\GRP4\gamemodes\GRP4.pwn(3189) : error 017: undefined symbol "offerCar"
C:\Documents and Settings\pukissebas.HATA-10A8A7683A\Desktop\Domanto failiukai\GRP4\GRP4\gamemodes\GRP4.pwn(3189) : warning 215: expression has no effect
C:\Documents and Settings\pukissebas.HATA-10A8A7683A\Desktop\Domanto failiukai\GRP4\GRP4\gamemodes\GRP4.pwn(3189) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\pukissebas.HATA-10A8A7683A\Desktop\Domanto failiukai\GRP4\GRP4\gamemodes\GRP4.pwn(3189) : error 029: invalid expression, assumed zero
C:\Documents and Settings\pukissebas.HATA-10A8A7683A\Desktop\Domanto failiukai\GRP4\GRP4\gamemodes\GRP4.pwn(3189) : fatal error 107: too many error messages on one line

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


4 Errors.

Visas masinu komandu scriptas:

//==============================================================================
//                            Masino Komandos                                 //
//==============================================================================
if(!strcmp(cmdtext, "/atsaukti", true,9))
{
    for (new i=0; i	    {
        if (offerCar[i][0]==playerid)
        {
            offerCar[i]={-1,0};
            SendClientMessage(playerid, COLOR_RED, "Nenupirkai.");
            if (IsPlayerConnected(i))
            {
				new playername[MAX_PLAYER_NAME];
				GetPlayerName(playerid,playername,sizeof(playername));
                format(string,128,"%s neperka.",playername);
                   SendClientMessage(i, COLOR_GREEN, string);
            }
            return 1;
        }
    }
    SendClientMessage(playerid, COLOR_GREY, "Ka tu nori daryt?");
    return 1;
}
if(!strcmp(cmdtext, "/sutinku", true,8))
{
if(GetPlayerScore(playerid)<70)
		{
			SendClientMessage(playerid,RED,"* Mazoka patirtis jusu!Reiketu bent jau 70xp!");
			return 1;
		}
    if (offerCar[playerid][0]!=-1)
    {
        if (IsPlayerConnected(offerCar[playerid][0]))
        {
            if (Carlist[playerid][Typ]==-1)
            {
                if (Carlist[offerCar[playerid][0]][Typ]!=-1)
                {
                    if (GetPlayerMoneyA(playerid)>=offerCar[playerid][1])
                    {
                        new sellerid=offerCar[playerid][0];
                        new price=offerCar[playerid][1];
                        offerCar[playerid]={-1,0};
          	        		GivePlayerMoneyA(playerid, - price);
          	        		GivePlayerMoneyA(sellerid, price);
          	        		Carlist[playerid][Typ]=Carlist[sellerid][Typ];
          	        		Carlist[playerid][X]=Carlist[sellerid][X];
          	        		Carlist[playerid][Y]=Carlist[sellerid][Y];
				        Carlist[playerid][Z]=Carlist[sellerid][Z];
				        Carlist[playerid][Rotation]=Carlist[sellerid][Rotation];
				        Carlist[playerid][status]=Carlist[sellerid][status];
				        Carlist[playerid][Lock]=Carlist[sellerid][Lock];
				        Carlist[playerid][Carid]=Carlist[sellerid][Carid];
		                Carlist[playerid][Color1]=Carlist[sellerid][Color1];
		                Carlist[playerid][Color2]=Carlist[sellerid][Color2];
		                Carlist[playerid][mod1]=Carlist[sellerid][mod1];
		                Carlist[playerid][mod2]=Carlist[sellerid][mod2];
		                Carlist[playerid][mod3]=Carlist[sellerid][mod3];
		                Carlist[playerid][mod4]=Carlist[sellerid][mod4];
		                Carlist[playerid][mod5]=Carlist[sellerid][mod5];
		                Carlist[playerid][mod6]=Carlist[sellerid][mod6];
		                Carlist[playerid][mod7]=Carlist[sellerid][mod7];
		                Carlist[playerid][mod8]=Carlist[sellerid][mod8];
		                Carlist[playerid][mod9]=Carlist[sellerid][mod9];
		                Carlist[playerid][mod10]=Carlist[sellerid][mod10];
		                Carlist[playerid][mod11]=Carlist[sellerid][mod11];
		                Carlist[playerid][mod12]=Carlist[sellerid][mod12];
		                Carlist[playerid][mod13]=Carlist[sellerid][mod13];
		                Carlist[playerid][mod14]=Carlist[sellerid][mod14];
		                Carlist[playerid][mod15]=Carlist[sellerid][mod15];
		                Carlist[playerid][mod16]=Carlist[sellerid][mod16];
		                Carlist[playerid][mod17]=Carlist[sellerid][mod17];
		                Carlist[playerid][mod18]=Carlist[sellerid][mod18];
		                Carlist[playerid][Paintjob]=Carlist[sellerid][Paintjob];
		                Carlist[sellerid][Typ]=-1; Carlist[sellerid][X]=0.0; Carlist[sellerid][Y]=0.0; Carlist[sellerid][Z]=0.0;
		                Carlist[sellerid][Rotation]=0.0; Carlist[sellerid][status]=0; Carlist[sellerid][Lock]=0; Carlist[sellerid][Carid]=-1;
		                Carlist[sellerid][Color1]=-1; Carlist[sellerid][Color2]=-1; Carlist[sellerid][mod1]=-1; Carlist[sellerid][mod2]=-1;
		                Carlist[sellerid][mod3]=-1; Carlist[sellerid][mod4]=-1; Carlist[sellerid][mod5]=-1; Carlist[sellerid][mod6]=-1;
		                Carlist[sellerid][mod7]=-1; Carlist[sellerid][mod8]=-1; Carlist[sellerid][mod9]=-1; Carlist[sellerid][mod10]=-1;
		                Carlist[sellerid][mod11]=-1; Carlist[sellerid][mod12]=-1; Carlist[sellerid][mod13]=-1; Carlist[sellerid][mod14]=-1;
		                Carlist[sellerid][mod15]=-1; Carlist[sellerid][mod16]=-1; Carlist[sellerid][mod17]=-1; Carlist[sellerid][mod18]=-1; Carlist[sellerid][Paintjob]=-1;
				        if (Carlist[playerid][status]==1)
				        {
		                    SetVehicleParamsForAll(Carlist[playerid][Carid],0,Carlist[playerid][Lock]);
		                    SetVehicleParamsForPlayer(Carlist[playerid][Carid],playerid,0,0);
		                }
                           format(string,128,"Sveikiname! Jus isigijote transporto priemone %s  uz %i LT!",Buylist[Carlist[playerid][Typ]][Name],price);
						SendClientMessage(playerid, COLOR_RED, string);
						SendClientMessage(playerid, COLOR_GREEN, "Pagrindines transporto priemoniu komandas rasi parases /transportas");
						playerDB[playerid][bagazas] = 0;
	 					new playername[MAX_PLAYER_NAME];
						GetPlayerName(playerid,playername,sizeof(playername));
		                format(string,128,"Jus pardavete %s uz %i LT!",playername, price);
		                SendClientMessage(sellerid, COLOR_RED, string);
		                playerDB[sellerid][bagazas] = 0;
                    }
                    else
                    {
                        format(string, 128, "Nepakanka pinigeliu (reikalinga suma: %i LT)!", offerCar[playerid][1]);
                        SendClientMessage(playerid, COLOR_GREY, string);
                        SendClientMessage(offerCar[playerid][0], COLOR_GREY, "pirkejas neturi tiek pinigu");
                    }
                   }
                   else
                   {
                       offerCar[playerid]={-1,0};
                       SendClientMessage(playerid, COLOR_GREY, "Pardavejas nebeturi transporto priemones!.");
                   }
            }
            else
            {
		        SendClientMessage(playerid, COLOR_GREY, "Tu jau turi transporto priemone!");
            }
		}
           else
           {
               offerCar[playerid]={-1,0};
               SendClientMessage(playerid, COLOR_GREY, "Pardavejo nera.");
           }
    }
    else
    {
        SendClientMessage(playerid, COLOR_GREY, "Ne.");
    }
    return 1;
}


if(!strcmp(cmdtext, "/siulyti", true,8))
{
/*	tmp = strtok(cmdtext, idx);
	if (!strlen(tmp))
	{
	    SendClientMessage(playerid, COLOR_GREY, "Parduoti: /siulyti [vardas] [kaina]");
           return 1;
       }*/
       if(GetPlayerScore(playerid)<100)
		{
			SendClientMessage(playerid,RED,"* Mazoka patirtis jusu!Reiketu bent jau 100xp!");
			return 1;
		}

	new tname[MAX_PLAYER_NAME];
	strmid(tname,GetArgument(1, cmdtext, 0),0,MAX_PLAYER_NAME);
	if(!strcmp(tname,"0",true)){SendClientMessage(playerid, BLUE, "* Parduoti: /siulyti [vardas] [kaina]"); return 1;}
	new sellplayerid = GetPlayeridMid(tname);
	if(sellplayerid==INVALID_PLAYER_ID)
	{
		SendClientMessage(playerid,RED,"* Tokio zaidejo nera.");
		return 1;
	}
	if(GetPlayerScore(sellplayerid)<100)
		{
			SendClientMessage(playerid,RED,"* Deja, bet pirkejas dar per jaunas vairuoti!");
			return 1;
		}
	GetPlayerName(sellplayerid,tname,sizeof(tname));
	new tstring[256];
	tstring = GetArgument(2, cmdtext, 0);
	if(!IsNumeric(tstring)){SendClientMessage(playerid, BLUE, "* Parduoti: /siulyti [vardas] [kaina (turi buti skaicius)]"); return 1;}
	new price = StringToInt(tstring);
	if(price < 500){SendClientMessage(playerid, BLUE, "* Kaina ne mazesne 500 LT"); return 1;}
	new Float:Coo[3];
	GetPlayerPos(sellplayerid,Coo[0],Coo[1],Coo[2]);
	if(!PlayerToPoint(30, playerid, Coo[0],Coo[1],Coo[2])){SendClientMessage(playerid, RED, "* Zaidejas per toli!"); return 1;}




/*			new sellplayerid[MAX_PLAYER_NAME];
			strmid(sellplayerid,GetArgument(1, cmdtext,0),0,MAX_PLAYER_NAME);
		if(!strcmp(sellplayerid, "0", true) ){SendClientMessage(playerid, BLUE, "* Atimti ginklus: /takew [dalis vardo]"); return 1;}
		new id = GetPlayeridMid(sellplayerid);
		if (id == INVALID_PLAYER_ID){ SendClientMessage(playerid, RED, "* Tokio zaidejo nera"); return 1;}
		return 1;*/

 /*      new sellplayerid = GetArgument(1, cmdtext, 0);
       tmp = strtok(cmdtext, idx);
	if (!strlen(tmp))
	{
	    SendClientMessage(playerid, COLOR_GREY, "Parduoti: /siulyti [vardas] [kaina]");
           return 1;
       }*/
/*        new price = strval(tmp);
       if (price<500)
       {
	    SendClientMessage(playerid, COLOR_GREY, "Kaina ne mazesne 500 LT.");
           return 1;
       }*/
    if (Carlist[playerid][Typ]==-1)
    {
        SendClientMessage(playerid, COLOR_GREY, "Neturi ka parduoti!");
        return 1;
    }
    /*   if (!IsPlayerConnected(sellplayerid))
       {
	    SendClientMessage(playerid, COLOR_GREY, "Tokio zaidejo nera.");
           return 1;
       }*/
       offerCar[sellplayerid][0]=playerid;
	offerCar[sellplayerid][1]=price;
	new playername[MAX_PLAYER_NAME];
	new sellplayername[MAX_PLAYER_NAME];
	GetPlayerName(playerid,playername,sizeof(playername));
	GetPlayerName(sellplayerid,sellplayername,sizeof(sellplayername));
	format(string,128,"Tu siulai %s pirkti uz %i LT!",sellplayername,price);
	SendClientMessage(playerid, COLOR_RED, string);
       format(string,128,"%s siulo %s uz %i LT.",playername,Buylist[Carlist[playerid][Typ]][Name],price);
       SendClientMessage(sellplayerid, COLOR_RED, string);
       SendClientMessage(sellplayerid, COLOR_YELLOW, "Nori pirkti /sutinku.");
       SendClientMessage(sellplayerid, COLOR_YELLOW, "Nenori pirkti /atsaukti.");
    return 1;
}

if(strcmp(cmdtext, "/cparduoti", true)==0)
{
if(GetPlayerScore(playerid)<190)
		{
			SendClientMessage(playerid,RED,"* Reiketu bent 190xp zaidejau :)");
			return 1;
		}
   if(!PlayerToPoint(35,playerid,-1979.7345,883.7254,46.0099))
	{
		SendClientMessage(playerid,RAUDONA,"* Jei nori parduot transporta, turi buti pardavimo aiksteleje.");
		return 1;
   	}
	new Float:cpo[3];
	GetVehiclePos(Carlist[playerid][Carid],cpo[0],cpo[1],cpo[2]);

	if(!PlayerToPoint(7,playerid,cpo[0],cpo[1],cpo[2]))
	{
		SendClientMessage(playerid,RAUDONA,"* Turi buti prie savo transporto priemones.");
		return 1;
   	}
    if (Carlist[playerid][Typ]!=-1)
    {
        new price = (Buylist[Carlist[playerid][Typ]][Price]/5)*4;
        if (IsPlayerInVehicle(playerid,Carlist[playerid][Carid])) { RemovePlayerFromVehicle(playerid); }
        GivePlayerMoneyA(playerid, price);
        DestroyVehicle(Carlist[playerid][Carid]);
		Carlist[playerid][Typ]=-1; Carlist[playerid][X]=0.0; Carlist[playerid][Y]=0.0; Carlist[playerid][Z]=0.0;
		Carlist[playerid][Rotation]=0.0; Carlist[playerid][status]=0; Carlist[playerid][Lock]=0; Carlist[playerid][Carid]=-1;
		Carlist[playerid][Color1]=-1; Carlist[playerid][Color2]=-1; Carlist[playerid][mod1]=-1; Carlist[playerid][mod2]=-1;
		Carlist[playerid][mod3]=-1; Carlist[playerid][mod4]=-1; Carlist[playerid][mod5]=-1; Carlist[playerid][mod6]=-1;
		Carlist[playerid][mod7]=-1; Carlist[playerid][mod8]=-1; Carlist[playerid][mod9]=-1; Carlist[playerid][mod10]=-1;
		Carlist[playerid][mod11]=-1; Carlist[playerid][mod12]=-1; Carlist[playerid][mod13]=-1; Carlist[playerid][mod14]=-1;
		Carlist[playerid][mod15]=-1; Carlist[playerid][mod16]=-1; Carlist[playerid][mod17]=-1; Carlist[playerid][mod18]=-1; Carlist[playerid][Paintjob]=-1;
		format(string,128,"Tavo transportas parduotas uz %i LT!",price);
		SendClientMessage(playerid, COLOR_RED, string);
           playerDB[playerid][bagazas] = 0;
		if(playerDB[playerid][authstate]==4) SavePlayerData(playerid,true);
    }
    else { SendClientMessage(playerid, COLOR_GREY, "Neturi ka parduoti!"); }
    return 1;
}

	if(!strcmp(cmdtext, "/remont", true,7))
{
    if (Carlist[playerid][Typ]!=-1)
	{
		if (Carlist[playerid][status]==0)
		{
		    new reparatur = Buylist[Carlist[playerid][Typ]][Repair];
			if (reparatur <= GetPlayerMoneyA(playerid))
			{
			    Carlist[playerid][status]=1;
                   Carlist[playerid][Carid]=CreateTunedCar(playerid);
				GivePlayerMoneyA(playerid, - reparatur);
				format(string, 128, "Atstatyta uz %i LT! Ieskok /carmapas.", reparatur);
				SendClientMessage(playerid, RED, string);
			}
			else { format(string, 128, "Atstatymui reikes (%i LT)!", reparatur); SendClientMessage(playerid, COLOR_LIGHTRED, string); }
		}
        else { SendClientMessage(playerid, COLOR_GREY, "Ka cia darai???"); }
	}
	else { SendClientMessage(playerid, COLOR_GREY, "Tu neturi automobilio!"); }
	return 1;
}

		if(!strcmp(cmdtext, "/tpm", true,12))
{
if (Carlist[playerid][Carid]==-1)
{
SendClientMessage(playerid,RED,"Jus neturite masinos, arba ji sudauzyta. Pabandykit /remont");
return 1;
}
new Float:coo[3];
GetVehiclePos(Carlist[playerid][Carid],coo[0],coo[1],coo[2]);
SetPlayerPos(playerid,coo[0]+3,coo[1],coo[2]);
SendClientMessage(playerid,COLOR_YELLOW,"Buvote sekmingai nuteleportuotas prie savo masinos");
return 1;
}

if(strcmp(cmdtext, "/uzrakinti", true,9)==0 && IsPlayerInAnyVehicle(playerid)  && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
       new vehicleid = GetPlayerVehicleID(playerid);
       if(vehicleDB[vehicleid][locked]){SendClientMessage(playerid,COLOR,"* Masina yra uzrakinta."); return 1;}
	if(playerDB[playerid][pcar] != -1){SendClientMessage(playerid,COLOR,"* Jums gali priklausyti tik 1 masina."); return 1;}
	playerDB[playerid][pcar]=vehicleid;
	vehicleDB[vehicleid][locked]=true;
	GetPlayerName(playerid,vehicleDB[vehicleid][owner_name],MAX_PLAYER_NAME);//MAX_PLAYER_NAME butinas, nes naudojama suskirstyta sekcijomis 2D array.
	SendClientMessage(playerid,COLOR,"* Masina uþrakinta");
	return 1;
}

	if(strcmp(cmdtext, "/atrakinti", true,9)==0 && IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
    new name[MAX_PLAYER_NAME];
    new vehicleid = GetPlayerVehicleID(playerid);
    GetPlayerName(playerid,name,MAX_PLAYER_NAME);
    if(strcmp(name,vehicleDB[vehicleid][owner_name],false))
    {
        SendClientMessage(playerid,COLOR,"* Masina ne jusu.");
		return 1;
	}

 	    if(!vehicleDB[vehicleid][locked]){SendClientMessage(playerid,COLOR,"* Masina nera uzrakinta."); return 1;}
	playerDB[playerid][pcar]=-1;
	vehicleDB[vehicleid][locked]=false;
	SendClientMessage(playerid,COLOR,"* Masina atrakinta");
	return 1;
}

man atrodo kad cia ne del komandu o kaskur kaska neirasiau :(

Dalintis šį pranešimą


Nuoroda iki šio pranešimo
Dalintis per kitą puslapį

Komentuoti gali tik prisijungę nariai

Jeigu turite paskyrą, prisijunkite

Sukurti paskyrą

Sukurkite paskyrą mūsų forume

Registruotis

Prisijungti

Turite paskyrą? Prisijunkite

Prisijungti dabar

  • Narių peržiūri šį forumą:   0 nariai

    Nėra registruotų narių peržiūrinčių šį forumą.


  • SuperGames programele
  • SuperGames programele


×