Undifine 'Params' plz help .
#1

I have error undifined params but params is already two time used but its giving error in new line here's the code .
Код:
if(strcmp(cmd, "/eventproperties", true) == 0)
	{
	new	desiredhp, desiredarmour, desiredwep1, desiredwep2, desiredwep3, desiredwep4, desiredwep5;
	if( sscanf(params, "eve", desiredhp, desiredarmour, desiredwep1, desiredwep2, desiredwep3, desiredwep4, desiredwep5))
	{
	    	if(PlayerInfo[playerid][pAdmin] >= 3)
	    {
			SendClientMessage( playerid, COLOR_GREY, "SYNTAX - /eventproperties [health] [armour] [weapon1] [weapon2] [weapon3] [weapon4] [weapon5]" );
		}
	}
	else
	{
	    	if(PlayerInfo[playerid][pAdmin] >= 3)
	    {
			    EventHP = desiredhp;
			    EventArmour = desiredarmour;
			    EventWeapon1 = desiredwep1;
			    EventWeapon2 = desiredwep2;
			    EventWeapon3 = desiredwep3;
			    EventWeapon4 = desiredwep4;
			    EventWeapon5 = desiredwep5;
			    GetPlayerPos( playerid, EventX, EventY, EventZ);
			    EventWorld = GetPlayerVirtualWorld( playerid );
			    EventInt = GetPlayerInterior( playerid );
			    SendClientMessage( playerid, COLOR_GREY, "You have set the properties. Type /startevent to start the event, or use the same command to change the properties." );
		    }
 }
	return 1;
}
Reply
#2

pawn Код:
if(!strcmp(cmd, "/eventproperties", true))
{
    new desiredhp, desiredarmour, desiredwep1, desiredwep2, desiredwep3, desiredwep4, desiredwep5;
    if(sscanf(cmd, "ddddddd", desiredhp, desiredarmour, desiredwep1, desiredwep2, desiredwep3, desiredwep4, desiredwep5))
    {
        return SendClientMessage( playerid, COLOR_GREY, "SYNTAX - /eventproperties [health] [armour] [weapon1] [weapon2] [weapon3] [weapon4] [weapon5]" );
    }
    else if(PlayerInfo[playerid][pAdmin] >= 3)
    {
        EventHP = desiredhp;
        EventArmour = desiredarmour;
        EventWeapon1 = desiredwep1;
        EventWeapon2 = desiredwep2;
        EventWeapon3 = desiredwep3;
        EventWeapon4 = desiredwep4;
        EventWeapon5 = desiredwep5;
        GetPlayerPos( playerid, EventX, EventY, EventZ);
        EventWorld = GetPlayerVirtualWorld( playerid );
        EventInt = GetPlayerInterior(playerid);
        SendClientMessage(playerid, COLOR_GREY, "You have set the properties. Type /startevent to start the event, or use the same command to change the properties." );
    }
    return 1;
}
Reply
#3

Its giving me two warning 'Lose identation' where the code start and at line where next code[cmd] start'.
Reply
#4

Quote:
Originally Posted by iRana
Посмотреть сообщение
Its giving me two warning 'Lose identation' where the code start and at line where next code[cmd] start'.
Add
pawn Код:
#pragma tabsize 0
At the top of your script.
Reply
#5

Quote:
Originally Posted by iRana
Посмотреть сообщение
Its giving me two warning 'Lose identation' where the code start and at line where next code[cmd] start'.
Then learn to indent properly....
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)