Warning 202 in /vticket
#1

Compile error:
Код:
./includes/commands.pwn(22597) : warning 202: number of arguments does not match definition
./includes/commands.pwn(22597) : warning 202: number of arguments does not match definition
./includes/commands.pwn(22597) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Warnings.
Line 22597:
Код:
					SendClientMessageEx(playerid, COLOR_WHITE, "You have issued a $%s ticket on %s's %s.", number_format(amount), GetPlayerNameEx(i), GetVehicleName(PlayerVehicleInfo[i][veh][pvId]));
The whole cmd:
PHP код:
CMD:vticket(playeridparams[])
{
    if(
IsACop(playerid) || IsATowman(playerid)) {
        new 
vehidamount;
        if(
sscanf(params"ii"vehidamount)) return SendClientMessageEx(playeridCOLOR_GREY"USAGE: /vticket [registration] [amount]");
        if(
PlayerInfo[playerid][pTicketTime] != 0) return SendClientMessageEx(playeridCOLOR_GRAD2"You must wait within a minute in order to use this command again!");
        if(
amount 50000) return SendClientMessageEx(playeridCOLOR_GREY"The maximum vehicle ticket amount is $50,000.");
        if(
amount 1) return SendClientMessageEx(playeridCOLOR_GREY"You can't ticket any vehicle below $1.");
        new 
string[128], FloatxFloatyFloatzveh = -1;
        
GetVehiclePos(vehidxyz);
        if(
IsPlayerInRangeOfPoint(playerid5.0xyz)) {
            foreach(new 
iPlayer) {
                if((
veh GetPlayerVehicle(ivehid)) != -1) {
                    
PlayerVehicleInfo[i][veh][pvTicket] += amount;
                    
PlayerInfo[playerid][pTicketTime] = 60;
                    
SendClientMessageEx(playeridCOLOR_WHITE"You have issued a $%s ticket on %s's %s."number_format(amount), GetPlayerNameEx(i), GetVehicleName(PlayerVehicleInfo[i][veh][pvId]));
                    
format(stringsizeof(string), "[VTICKET] Officer %s has ticketed %s's %s (%d) for $%s."GetPlayerNameEx(playerid), GetPlayerNameEx(i), GetVehicleName(PlayerVehicleInfo[i][veh][pvId]), PlayerVehicleInfo[i][veh][pvSlotId], number_format(amount));
                    
GroupLog(PlayerInfo[playerid][pMember], string);
                    break;
                }
            }
            
/*if((veh = IsDynamicCrateVehicle(vehid)) != -1) {
                if(ValidGroup(CrateVehicle[veh][cvGroupID])) {
                    if(PlayerInfo[playerid][pMember] == CrateVehicle[veh][cvGroupID]) return SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* Your group owns this vehicle you can't put a ticket on it!");
                    CrateVehicle[veh][cvTickets] += amount;
                    PlayerInfo[playerid][pTicketTime] = 60;
                    SendClientMessageEx(playerid, COLOR_WHITE, "You have issued a $%s ticket on the %s.", number_format(amount), VehicleName[CrateVehicle[veh][cvModel] - 400]);
                    format(string, sizeof(string), "[VTICKET] Officer %s has ticketed %s's %s (%d) for $%s.", GetPlayerNameEx(playerid), arrGroupData[CrateVehicle[veh][cvGroupID]][g_szGroupName], VehicleName[CrateVehicle[veh][cvModel] - 400], CrateVehicle[veh][cvId], number_format(amount));
                    GroupLog(PlayerInfo[playerid][pMember], string);
                    SaveCrateVehicle(veh);
                } else veh = -1;
            }*/
            
if(veh == -1) {
                
SendClientMessageEx(playeridCOLOR_GRAD2"This vehicle does not have any registration!");
            }
        }
        else 
SendClientMessageEx(playeridCOLOR_GRAD2"You need to be near such vehicle!");
    }
    else 
SendClientMessageEx(playeridCOLOR_GRAD2"You are not authorized to use this command.");
    return 
1;

Reply
#2

Код:
new string[300];
format(string, sizeof(string), "You have issued a $%s ticket on %s's %s.", number_format(amount), GetPlayerNameEx(i), GetVehicleName(PlayerVehicleInfo[i][veh][pvId]));
SendClientMessage(playerid, COLOR_WHITE, string);
Reply
#3

It's a problem with SendClientMessageEx .. It's probably not done or not used.

You can also do the following:
Код:
new str[129]; 
format(str, sizeof str, "You have issued a $%s ticket on %s's %s.", number_format(amount), GetPlayerNameEx(i), GetVehicleName(PlayerVehicleInfo[i][veh][pvId]));
SendClientMessage(playerid, -1, str);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)