Jump to content
  • 0

pomoc Neviem či to mám dobre :D


pinka123

Dotaz

Ahojte prosím neviete čo tu mám zle lebo mi hádže warnings

C:\Users\Marcelko\Desktop\help.pwn(224) : warning 202: number of arguments does not match definition
C:\Users\Marcelko\Desktop\help.pwn(246) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


2 Warnings.

 if(GetPlayerHealth(playerid) > 90) return SendClientMessage(playerid,COLOR_RED,"Máš plné zdravie!"); // Zistí koľko má hráč zdravie ak má viac než 100 nedá mu bonus ! Prví warning



	if (strcmp("/odomknut", cmdtext, true, 9) == 0)
{
	if (IsPlayerInAnyVehicle(playerid))
	{
        new Float:X, Float:Y, Float:Z;
        new motor, svetla, alarm, dvere, kapota, kufor, ciel;//S tímto mi pomohol DeLeTeCZ
        GetVehiclePos(GetPlayerVehicleID(playerid) /* vehicleid */, X, Y, Z);
        GetVehicleParamsEx(GetPlayerVehicleID(playerid), motor, svetla, alarm, dvere, kapota, kufor, ciel);
        SetVehicleParamsEx(GetPlayerVehicleID(playerid), motor, svetla, alarm, 1, kapota, kufor, ciel);
        SendClientMessage(playerid, COLOR_RED, "Odomkol si auto!");
	}
	return 1;
}
return 0;
}//Druhí warning
Link to comment
Share on other sites

7 odpovědí na tuto otázku

Recommended Posts

  • 0
  • Globální moderátor
 if(GetPlayerHealth(playerid) > 90) return SendClientMessage(playerid,COLOR_RED,"Máš plné zdravie!"); // Zistí koľko má hráč zdravie ak má viac než 100 nedá mu bonus ! Prví warning
 {


	if (strcmp("/odomknut", cmdtext, true, 9) == 0)
{
	if (IsPlayerInAnyVehicle(playerid))
	{
        new Float:X, Float:Y, Float:Z;
        new motor, svetla, alarm, dvere, kapota, kufor, ciel;//S tímto mi pomohol DeLeTeCZ
        GetVehiclePos(GetPlayerVehicleID(playerid) /* vehicleid */, X, Y, Z);
        GetVehicleParamsEx(GetPlayerVehicleID(playerid), motor, svetla, alarm, dvere, kapota, kufor, ciel);
        SetVehicleParamsEx(GetPlayerVehicleID(playerid), motor, svetla, alarm, 1, kapota, kufor, ciel);
        SendClientMessage(playerid, COLOR_RED, "Odomkol si auto!");
	}
	return 1;
}
}
return 0;

 a zle tabuješ...... preto to Loose Indentation

Link to comment
Share on other sites

  • 0

Ešťe mi treba toto tu opraviť 

if(GetPlayerHealth(playerid) > 90) return SendClientMessage(playerid,COLOR_RED,"Máš plné zdravie!"); // Zistí koľko má hráč zdravie ak má viac než 100 nedá mu bonus ! Prví warning
Link to comment
Share on other sites

  • 0
  • Globální moderátor

 

u toho loose indentation použij nahoru do modu #pragma tabsize 0

nebo oprav ty taby no :d

 

v živote pragma tabsize.... Najlepšie to opraviť.....

Link to comment
Share on other sites

  • 0

 

U kontroly života musíš mít dva parametry:

new
    Float:hp;
    GetPlayerHealth(playerid, hp);
if(hp > 90.0) return SendClientMessage(playerid,COLOR_RED,"Máš plné zdravie!");

Už som to opravil ako mi to poslal 8eep ale ďakujem

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...