Please help with 3 warning;s
#1

Код:
C:\Documents and Settings\Administrator\Desktop\uGaming oFficial done 20%\gamemodes\gf.pwn(4779) : warning 217: loose indentation
C:\Documents and Settings\Administrator\Desktop\uGaming oFficial done 20%\gamemodes\gf.pwn(4788) : warning 217: loose indentation
C:\Documents and Settings\Administrator\Desktop\uGaming oFficial done 20%\gamemodes\gf.pwn(20363) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrator\Desktop\uGaming oFficial done 20%\gamemodes\gf.pwn(20368) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase

Header size:           7144 bytes
Code size:          1384172 bytes
Data size:          4602916 bytes
Stack/heap size:      16384 bytes; estimated max. usage=4130 cells (16520 bytes)
Total requirements: 6010616 bytes

4 Warnings.
And Lines :
Код:
				if(newcar == 201 || newcar == 202 || newcar == 203 || newcar == 204 || newcar == 205 || newcar == 206 || newcar == 207)
		{
			if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6){ }
			else
			{
			    SendClientMessage(playerid, COLOR_GRAD1, " Nu esti membru Groove Street !");
			    RemovePlayerFromVehicle(playerid);
            }
		}
		if(newcar == 277)
		{
		    if(TakingLesson[playerid] == 1){}
		    else
		    {
		        SendClientMessage(playerid, COLOR_GREY, " You are not allowed to drive this car !");
			    RemovePlayerFromVehicle(playerid);
		    }
		}
and :
Код:
//------------------------------------------------[GOTObAnk]-------------------------------------
	if(strcmp(cmd, "/gotobank", true) == 0)
		{
	    if(IsPlayerConnected(playerid))
	    {
			if(PlayerInfo[playerid][pAdmin] >= 2)
			{
				if (GetPlayerState(playerid) == 2)
				{
					new tmpcar = GetPlayerVehicleID(playerid);
					SetVehiclePos(tmpcar, 	1460.9790,-1021.4325,23.9616,92.1847);
					TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
				}
				else
				{
					SetPlayerPos(playerid, 	1460.9790,-1021.4325,23.9616,92.1847);
				}
				SendClientMessage(playerid, 0xA8A8FFFF, "   Te-ai teleportat cu Succes !");
				SetPlayerInterior(playerid,0);
				PlayerInfo[playerid][pInt] = 0;
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "   Nu EsTi Admin PenTru A FoLoSi CoManDa AceasTa  !");
			}
		}
		return 1;
	}
Please help me!
Reply
#2

Loose indention is caused by incorrect vertical alignment. For example:
pawn Код:
// Bad alignment
if( i == 1 )
{
    print( "i = 1" );
       print( "i != 2" );
}
// Proper alignment
if( i == 1 )
{
    print( "i = 1" );
    print( "i != 2" );
}
As for your errors, please specify the lines that you get errors on.
Reply
#3

i specified line's And Lines :
Quote:

Code:

if(newcar == 201 || newcar == 202 || newcar == 203 || newcar == 204 || newcar == 205 || newcar == 206 || newcar == 207)
{
if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6){ }
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Nu esti membru Groove Street !");
RemovePlayerFromVehicle(playerid);
}
}
if(newcar == 277)
{
if(TakingLesson[playerid] == 1){}
else
{
SendClientMessage(playerid, COLOR_GREY, " You are not allowed to drive this car !");
RemovePlayerFromVehicle(playerid);
}
}

and :
Code:

//------------------------------------------------[GOTObAnk]-------------------------------------
if(strcmp(cmd, "/gotobank", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 2)
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 1460.9790,-1021.4325,23.9616,92.1847);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid, 1460.9790,-1021.4325,23.9616,92.1847);
}
SendClientMessage(playerid, 0xA8A8FFFF, " Te-ai teleportat cu Succes !");
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Nu EsTi Admin PenTru A FoLoSi CoManDa AceasTa !");
}
}
return 1;
}

Please help me!

Reply
#4

And which of those lines are numbered 20363 and 20368?

Anyway, your errors are you're trying to set the x, y, z and angle with SetVehiclePos/SetPlayerPos functions. You need to use SetVehicleZAngle and SetPlayerFacingAngle.
pawn Код:
SetVehiclePos(tmpcar, 1460.9790,-1021.4325,23.9616);
SetVehicleZAngle(tmpcar,92.1847);
//and
SetPlayerPos(playerid, 1460.9790,-1021.4325,23.9616);
SetPlayerFacingAngle(playerid,92.1847);
Reply
#5

Код:
//------------------------------------------------[GOTObAnk]-------------------------------------
	if(strcmp(cmd, "/gotobank", true) == 0)
		{
	    if(IsPlayerConnected(playerid))
	    {
			if(PlayerInfo[playerid][pAdmin] >= 2)
			{
				if (GetPlayerState(playerid) == 2)
				{
			**HERE IS WARNING**	new tmpcar = GetPlayerVehicleID(playerid);
					SetVehiclePos(tmpcar, 	1460.9790,-1021.4325,23.9616,92.1847);
					TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
				}
				else
				{
				**AND HERE IS WARNING**	SetPlayerPos(playerid, 	1460.9790,-1021.4325,23.9616,92.1847);
				}
				SendClientMessage(playerid, 0xA8A8FFFF, "   Te-ai teleportat cu Succes !");
				SetPlayerInterior(playerid,0);
				PlayerInfo[playerid][pInt] = 0;
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "   Nu EsTi Admin PenTru A FoLoSi CoManDa AceasTa  !");
			}
		}
		return 1;
	}
Please help me![/QUOTE]
Reply
#6

He already gave you the answer, you're using 5 parameters in a function that only accepts 4 parameters!

pawn Код:
SetVehiclePos(tmpcar, 1460.9790,-1021.4325,23.9616,92.1847);
SetPlayerPos(playerid,  1460.9790,-1021.4325,23.9616,92.1847);
You see, 5 parameters, these functions only accept 4 parameters. Look at these pages for more information:

https://sampwiki.blast.hk/wiki/SetVehiclePos
https://sampwiki.blast.hk/wiki/SetPlayerPos
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)