Peršokti į turinį
Gυminis

Kaip sutaisyti šiuos error'rus

Recommended Posts

Neįsivaizduoju kaip jau sutaisyti šiuos erorr'us.

\gamemodes\mysqlGM.pwn(279) : error 017: undefined symbol "PakeistiKeiksmazodi"
\gamemodes\mysqlGM.pwn(363) : error 017: undefined symbol "IsABike"
\gamemodes\mysqlGM.pwn(367) : error 017: undefined symbol "UpdateSpeedo"
\gamemodes\mysqlGM.pwn(387) : error 028: invalid subscript (not an array or too many subscripts): "Variklis"
\gamemodes\mysqlGM.pwn(387) : warning 215: expression has no effect
\gamemodes\mysqlGM.pwn(387) : error 001: expected token: ";", but found "]"
\gamemodes\mysqlGM.pwn(387) : error 029: invalid expression, assumed zero
279 eilutė:

for(new i; i != sizeof(Keiksmazodziai); ++i)
	{
	PakeistiKeiksmazodi(text, Keiksmazodziai[i]);
}

363 ir 367 eilutė:

if(!IsABike(GetPlayerVehicleID(playerid)) )
	    {
			for(new s = 0; s < 4; s++) TextDrawShowForPlayer(playerid, speed_pTD[playerid][s]);
			for(new s = 0; s < 6; s++) TextDrawShowForPlayer(playerid, speed_TD[s]);
	        UpdateSpeedo(playerid);
		}

387 eilutė:

if(m == 481 || m == 510 || m == 509 || m == 462) //Netaikomi dviraciams dalykai
		{
			new vid = GetPlayerVehicleID(playerid);
 			GetVehicleParamsEx(vid, Variklis[playerid],Lempos[playerid],Signalas[playerid],Durys[playerid],Kapotas[playerid],Boot[playerid],Objective[playerid] );
            SetVehicleParamsEx(vid,1,Lempos[playerid],Signalas[playerid],Durys[playerid],Kapotas[playerid],Boot[playerid],Objective[playerid]);
		}

dėkui iš anksto!!!

Dalintis šį pranešimą


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


1 minute prieš, dzeronimo parašė:

kaip traukiai koda pamiršai stock pasiimti :D

nepamiršau:

stock UpdateSpeedo(playerid)
{
	if(!IsPlayerInAnyVehicle(playerid)) return 1;

	new vehicleid = GetPlayerVehicleID(playerid);


	new
        str [ 145 ],
        Float:vHP
    ;


	new pSpeed = GetPlayerSpeed(playerid);

    GetVehicleHealth(vehicleid, vHP);
    new Dirzasss[30];
    if(Dirzas[playerid] == 1) Dirzasss = "~g~Uzsegtas";
    if(Dirzas[playerid] == 0) Dirzasss = "~r~Atsegtas";

    new Autopil[30];
    if(Autop[ playerid ] == true) Autopil = "~g~Ijungtas";
    if(Autop[ playerid ] == false) Autopil = "~r~Isjungtas";

    format(str, sizeof str, "%03d", pSpeed), TextDrawSetString(speed_pTD [ playerid ] [ 3 ], str), format(str, sizeof str, "~w~Dirzas: %s~n~~w~Autopilotas: %s~n~~w~Degalai: ~y~%dL~n~~w~Radijas: %s~n~~w~Bukle: ~g~%.1f%%", Dirzasss,Autopil,tInfo[vehicleid][Degalai],StotiesPav[playerid],vHP/10), TextDrawSetString(speed_pTD [ playerid ] [ 2 ], str);
    format(str, sizeof str, "%s", TransportoPavadinimai[GetVehicleModel(vehicleid) - 400]), TextDrawSetString(speed_pTD [ playerid ] [ 1 ], str);
    format(str, sizeof str, "%.1f KM", tInfo[vehicleid][Rida]), TextDrawSetString(speed_pTD [ playerid ] [ 0 ], str);

    return 0;
}

stock IsABike(vehicleid)
{
    new Modelis = GetVehicleModel(vehicleid);
    if(Modelis == 481 || Modelis == 510 || Modelis == 509 || Modelis == 462) return (true);
    else return (false);
}
stock IsABoat(carid)
{
    new modelid = GetVehicleModel(carid);
    if(modelid == 430 || modelid == 446 || modelid == 452 || modelid == 453 || modelid == 454 || modelid == 472 || modelid == 473 || modelid == 484 || modelid == 493 || modelid == 595) return (true);
    else return (false);
}
stock IsAPlane(vehicleid)
{
    new Modelis = GetVehicleModel(vehicleid);
    if(Modelis == 592 || Modelis == 577 || Modelis == 511 || Modelis == 512 || Modelis == 593 || Modelis == 520 || Modelis == 553 || Modelis == 476 || Modelis == 519 || Modelis == 460 || Modelis == 513 ||
	Modelis == 548 || Modelis == 425 || Modelis == 417 || Modelis == 487 || Modelis == 488 || Modelis == 497 || Modelis == 563 || Modelis == 469) return (true);
    else return (false);
}



stock PakeistiKeiksmazodi(string[], Keiksmazodziai[],Simbolis = '*')
{
	new i;
	while((i = strfind(string, Keiksmazodziai, true)) != -1)
	{
	for(new x = (i + strlen(Keiksmazodziai)); i != x; ++i)
	{
		string[i] = Simbolis;
	}

return 1;
}

 

Dalintis šį pranešimą


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

1 minute prieš, SkanusMajonezas parašė:

nepamiršau:

stock UpdateSpeedo(playerid)
{
	if(!IsPlayerInAnyVehicle(playerid)) return 1;

	new vehicleid = GetPlayerVehicleID(playerid);


	new
        str [ 145 ],
        Float:vHP
    ;


	new pSpeed = GetPlayerSpeed(playerid);

    GetVehicleHealth(vehicleid, vHP);
    new Dirzasss[30];
    if(Dirzas[playerid] == 1) Dirzasss = "~g~Uzsegtas";
    if(Dirzas[playerid] == 0) Dirzasss = "~r~Atsegtas";

    new Autopil[30];
    if(Autop[ playerid ] == true) Autopil = "~g~Ijungtas";
    if(Autop[ playerid ] == false) Autopil = "~r~Isjungtas";

    format(str, sizeof str, "%03d", pSpeed), TextDrawSetString(speed_pTD [ playerid ] [ 3 ], str), format(str, sizeof str, "~w~Dirzas: %s~n~~w~Autopilotas: %s~n~~w~Degalai: ~y~%dL~n~~w~Radijas: %s~n~~w~Bukle: ~g~%.1f%%", Dirzasss,Autopil,tInfo[vehicleid][Degalai],StotiesPav[playerid],vHP/10), TextDrawSetString(speed_pTD [ playerid ] [ 2 ], str);
    format(str, sizeof str, "%s", TransportoPavadinimai[GetVehicleModel(vehicleid) - 400]), TextDrawSetString(speed_pTD [ playerid ] [ 1 ], str);
    format(str, sizeof str, "%.1f KM", tInfo[vehicleid][Rida]), TextDrawSetString(speed_pTD [ playerid ] [ 0 ], str);

    return 0;
}

stock IsABike(vehicleid)
{
    new Modelis = GetVehicleModel(vehicleid);
    if(Modelis == 481 || Modelis == 510 || Modelis == 509 || Modelis == 462) return (true);
    else return (false);
}
stock IsABoat(carid)
{
    new modelid = GetVehicleModel(carid);
    if(modelid == 430 || modelid == 446 || modelid == 452 || modelid == 453 || modelid == 454 || modelid == 472 || modelid == 473 || modelid == 484 || modelid == 493 || modelid == 595) return (true);
    else return (false);
}
stock IsAPlane(vehicleid)
{
    new Modelis = GetVehicleModel(vehicleid);
    if(Modelis == 592 || Modelis == 577 || Modelis == 511 || Modelis == 512 || Modelis == 593 || Modelis == 520 || Modelis == 553 || Modelis == 476 || Modelis == 519 || Modelis == 460 || Modelis == 513 ||
	Modelis == 548 || Modelis == 425 || Modelis == 417 || Modelis == 487 || Modelis == 488 || Modelis == 497 || Modelis == 563 || Modelis == 469) return (true);
    else return (false);
}



stock PakeistiKeiksmazodi(string[], Keiksmazodziai[],Simbolis = '*')
{
	new i;
	while((i = strfind(string, Keiksmazodziai, true)) != -1)
	{
	for(new x = (i + strlen(Keiksmazodziai)); i != x; ++i)
	{
		string[i] = Simbolis;
	}

return 1;
}

 

pradedam nuo to , kokiam calbacke tie kodai ? ne stock o tie kur klaidos

Dalintis šį pranešimą


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

1 minute prieš, dzeronimo parašė:

pradedam nuo to , kokiam calbacke tie kodai ? ne stock o tie kur klaidos

public OnPlayerStateChange(playerid, newstate, oldstate)
{
	if(newstate == PLAYER_STATE_DRIVER)
	{
	    if(!IsABike(GetPlayerVehicleID(playerid)) )
	    {
			for(new s = 0; s < 4; s++) TextDrawShowForPlayer(playerid, speed_pTD[playerid][s]);
			for(new s = 0; s < 6; s++) TextDrawShowForPlayer(playerid, speed_TD[s]);
	        UpdateSpeedo(playerid);
		}
	}
	if(oldstate == PLAYER_STATE_DRIVER)
	{
		for(new s = 0; s < 4; s++) TextDrawHideForPlayer(playerid, speed_pTD[playerid][s]);
		for(new s = 0; s < 6; s++) TextDrawHideForPlayer(playerid, speed_TD[s]);
	}
	
	new vehicleid = GetPlayerVehicleID(playerid);
	new m = GetVehicleModel(vehicleid);
	new Float:vhp;
	GetVehicleHealth(GetPlayerVehicleID(playerid), vhp);
	vhealth[playerid] = vhp;
	if(newstate == PLAYER_STATE_DRIVER)
	{

		if(m == 481 || m == 510 || m == 509 || m == 462) //Netaikomi dviraciams dalykai
		{
			new vid = GetPlayerVehicleID(playerid);
 			GetVehicleParamsEx(vid, Variklis[playerid],Lempos[playerid],Signalas[playerid],Durys[playerid],Kapotas[playerid],Boot[playerid],Objective[playerid] );
            SetVehicleParamsEx(vid,1,Lempos[playerid],Signalas[playerid],Durys[playerid],Kapotas[playerid],Boot[playerid],Objective[playerid]);
		}
        if(!IsABike(vehicleid))
        {
	 		SendClientMessage(playerid, COLOR_Info, "[ < ] Jeigu nenorite susižaloti: {FF8C00}„/dirzas“");
			SendClientMessage(playerid, COLOR_Info, "[ < ] Važiuokite lėtai: {FF8C00}„/autopilotas“");
			SendClientMessage(playerid, COLOR_Info, "[ < ] Transporto valdymą galite sužinoti: {FF8C00}„N“");
        }
        else
        {
      		SendClientMessage(playerid, COLOR_Info, "[ < ] Jeigu nenorite susižaloti: {FF8C00}„/salmas“");
        }
   }

	new vehicleid = GetPlayerVehicleID(playerid);
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
        if(newkeys & KEY_ANALOG_DOWN)
        {
            if(!GetVehicleParams(vehicleid, VEHICLE_ENGINE))
			{
				SetVehicleParams(vehicleid, VEHICLE_ENGINE, true);
				SendClientMessage(playerid, COLOR_Info, "[ < ] Užvedėte transporto priemonės variklį.");
			}
			else
			{
				SetVehicleParams(vehicleid, VEHICLE_ENGINE, false);
				SendClientMessage(playerid, COLOR_Info, "[ < ] Išjungėte transporto priemonės variklį.");
			}
        }

    }
    return 1;
}

 

Dalintis šį pranešimą


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

1 minute prieš, SkanusMajonezas parašė:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
	if(newstate == PLAYER_STATE_DRIVER)
	{
	    if(!IsABike(GetPlayerVehicleID(playerid)) )
	    {
			for(new s = 0; s < 4; s++) TextDrawShowForPlayer(playerid, speed_pTD[playerid][s]);
			for(new s = 0; s < 6; s++) TextDrawShowForPlayer(playerid, speed_TD[s]);
	        UpdateSpeedo(playerid);
		}
	}
	if(oldstate == PLAYER_STATE_DRIVER)
	{
		for(new s = 0; s < 4; s++) TextDrawHideForPlayer(playerid, speed_pTD[playerid][s]);
		for(new s = 0; s < 6; s++) TextDrawHideForPlayer(playerid, speed_TD[s]);
	}
	
	new vehicleid = GetPlayerVehicleID(playerid);
	new m = GetVehicleModel(vehicleid);
	new Float:vhp;
	GetVehicleHealth(GetPlayerVehicleID(playerid), vhp);
	vhealth[playerid] = vhp;
	if(newstate == PLAYER_STATE_DRIVER)
	{

		if(m == 481 || m == 510 || m == 509 || m == 462) //Netaikomi dviraciams dalykai
		{
			new vid = GetPlayerVehicleID(playerid);
 			GetVehicleParamsEx(vid, Variklis[playerid],Lempos[playerid],Signalas[playerid],Durys[playerid],Kapotas[playerid],Boot[playerid],Objective[playerid] );
            SetVehicleParamsEx(vid,1,Lempos[playerid],Signalas[playerid],Durys[playerid],Kapotas[playerid],Boot[playerid],Objective[playerid]);
		}
        if(!IsABike(vehicleid))
        {
	 		SendClientMessage(playerid, COLOR_Info, "[ < ] Jeigu nenorite susižaloti: {FF8C00}„/dirzas“");
			SendClientMessage(playerid, COLOR_Info, "[ < ] Važiuokite lėtai: {FF8C00}„/autopilotas“");
			SendClientMessage(playerid, COLOR_Info, "[ < ] Transporto valdymą galite sužinoti: {FF8C00}„N“");
        }
        else
        {
      		SendClientMessage(playerid, COLOR_Info, "[ < ] Jeigu nenorite susižaloti: {FF8C00}„/salmas“");
        }
   }

	new vehicleid = GetPlayerVehicleID(playerid);
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
        if(newkeys & KEY_ANALOG_DOWN)
        {
            if(!GetVehicleParams(vehicleid, VEHICLE_ENGINE))
			{
				SetVehicleParams(vehicleid, VEHICLE_ENGINE, true);
				SendClientMessage(playerid, COLOR_Info, "[ < ] Užvedėte transporto priemonės variklį.");
			}
			else
			{
				SetVehicleParams(vehicleid, VEHICLE_ENGINE, false);
				SendClientMessage(playerid, COLOR_Info, "[ < ] Išjungėte transporto priemonės variklį.");
			}
        }

    }
    return 1;
}

 

gerai , o dabar visus stockus perkelk į gm viršu :D ir bandyk komplikuoti koda

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


×