Whats wrong...
#1

Whats wrong with it?

Код:
command(bentrancefee, playerid, params[])
{
    new money;
	if( sscanf( params, "dd", money) )
	{
	    if( Player[playerid][Business] > 0 )
	    {
	        SendClientMessage( playerid, WHITE, "TIP: /bentrancefee [price]" );
		}
		else
		{
			if( Player[playerid][Business] > 0 )
			{
	    		Businesses[Player[playerid][Business]][bEntrance] = money;
	    		SendClientMessage( playerid, WHITE, "Your bizness entrance fee were setted to %s", Businesses[Player[playerid][Business]][bEntrance]); // 24073 this is the warning line
			}
		}
	}
	return 1;
}
Код:
C:\SA-MP Server\gamemodes\Roleplay.pwn(24073) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
Whats wrong there?
Reply
#2

Use this, instead of the warning line:
pawn Код:
new string[128];
format(string, 128, "Your bizness entrance fee were setted to %s", Businesses[Player[playerid][Business]][bEntrance]);
SendClientMessage( playerid, WHITE, string);
Reply
#3

pawn Код:
command(bentrancefee, playerid, params[])
{
    new money;
    new string[128];
    if( sscanf( params, "d", money) )
    {
        if( Player[playerid][Business] > 0 )
        {
            SendClientMessage( playerid, WHITE, "PARAUGS: /bentrancefee [cena]" );
        }
        else
        {
            if( Player[playerid][Business] > 0 )
            {
                Businesses[Player[playerid][Business]][bEntrance] = money;
                        format(string,sizeof(string),"Tava biznesa ieejas maksa tika uzstādīta uz %d", money);
                SendClientMessage( playerid, WHITE, string);
                        return 1;
            }
        }
    }
    return 1;
}
Try this
Reply
#4

Thank you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)