SA-MP Forums Archive
Some Warnings. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Some Warnings. (/showthread.php?tid=634118)



Some Warnings. - ProBro - 13.05.2017

(205) : warning 213: tag mismatch
Код:
if (strcmp ("/nrg", cmdtext, true,10) == 0)
	{
		SendClientMessage(playerid,COLOR_YELLOW,">> NRG - 500 Spawned!");
		GetPlayerPos(playerid, Float:X, Float:Y, Float:Z);
        GetPlayerFacingAngle(playerid, Float:Angle);
        CreateVehicle(522, X, Y, Z + 2.0, Angle + 90.0, -1, -1, 5000);
	return 1;
(213) : warning 213: tag mismatch
Код:
if (strcmp ("/Hydra", cmdtext, true,10) == 0)
	{
		SendClientMessage(playerid,COLOR_YELLOW,">> Hydra Spawned!");
		GetPlayerPos(playerid, Float:X, Float:Y, Float:Z);
        GetPlayerFacingAngle(playerid, Float:Angle);
        CreateVehicle(520, Float: X, Float: Y, Float: Z + 2.0, Angle + 90.0, -1, -1, 5000);
	return 1;
	}
(221) : warning 213: tag mismatch
>> Above
(255) : warning 219: local variable "Angle" shadows a variable at a preceding level
Код:
new Float:x,Float:y,Float:z,Float:Angle;
(271) : warning 209: function "OnPlayerKeyStateChange" should return a value

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


6 Warnings.


Respuesta: Some Warnings. - Ignaciodmr - 13.05.2017

Lines...?


Re: Respuesta: Some Warnings. - ProBro - 13.05.2017

Quote:
Originally Posted by Ignaciodmr
Посмотреть сообщение
Lines...?
the code below


Re: Some Warnings. - Banditul18 - 13.05.2017

1.
PHP код:
new Float:X,FloatY,Float:Z,Float:Angle;
GetPlayerPos(playeridXYZ);
GetPlayerFacingAngle(playeridAngle); 
2. Same as 1
3. The Float:Angle is defined aleardy(somewhere above)
4. Need to put return 1; at the end of public OnPlayerKeyStateChange


Re: Some Warnings. - Bolex_ - 13.05.2017

Код:
new Float:X, Float:Y, Float:Z, Float:Angle;
Код:
if (strcmp ("/nrg", cmdtext, true,10) == 0)
{
    SendClientMessage(playerid,COLOR_YELLOW,">> NRG - 500 Spawned!");
    GetPlayerPos(playerid, X, Y, Z);
    GetPlayerFacingAngle(playerid, Angle);
    CreateVehicle(522, X, Y, Z + 2.0, Angle, + 90.0, -1, -1, 5000);
    return 1;
Do same with /hydra also ( OnPlayerKeyStateChange ) should return 1;


Re: Some Warnings. - ProBro - 13.05.2017

Quote:
Originally Posted by Bolex_
Посмотреть сообщение
Код:
new Float:X, Float:Y, Float:Z, Float:Angle;
Код:
if (strcmp ("/nrg", cmdtext, true,10) == 0)
{
    SendClientMessage(playerid,COLOR_YELLOW,">> NRG - 500 Spawned!");
    GetPlayerPos(playerid, X, Y, Z);
    GetPlayerFacingAngle(playerid, Angle);
    CreateVehicle(522, X, Y, Z + 2.0, Angle, + 90.0, -1, -1, 5000);
    return 1;
Do same with /hydra also ( OnPlayerKeyStateChange ) should return 1;
let me check wait