sscanf warning
#1

Hey

PHP код:
command(pmplayeridparams[])
{
    new 
string[200], message[200], id;
    if(
sscanf(params"uz"idmessage))
    {
        
SendClientMessage(playeridWHITE"SYNTAX: /pm [playerid] [message]");
    }
    else
    {
        if(
IsPlayerConnectedEx(id))
        {
            if(
strlen(message) >= 1)
            {
                if(
Player[id][PMsEnabled] == 1)
                {
                    if(
Player[id][AFKStat] == 1)
                    {
                        
SendClientMessage(playeridWHITE"This administrator is away from keyboard, right now.");
                    }
                    else
                    {
                        
format(stringsizeof(string), "[PM] You have sent %s: %s "RemoveUnderScore(id), message);
                        
SendClientMessage(playeridPLAYERCOMstring);
                        
                        
format(stringsizeof(string), "[PM] from %s (ID: %d): %s "RemoveUnderScore(playerid), playeridmessage);
                        
SendClientMessage(idPLAYERCOMstring);
                        
                        
format(stringsizeof(string), "PM from [%d]%s to [%d]%s: %s"playerid,RemoveUnderScore(playerid),id,RemoveUnderScore(id),message);
                         
SendPMMessage(REDstring);
                        
PMsLog(string);
                    }
                }
                else
                {
                    
SendClientMessage(playeridWHITE"That player has disabled PMs!");
                }
            }
            else
            {
                
SendClientMessage(playeridWHITE"SYNTAX: /pm [playerid] [message]");
            }
        }
        else
        {
            
SendClientMessage(playeridWHITE"That player is not connected or isn't logged in.");
        }
    }
    return 
1;

error:
Код HTML:
[19:51:39] sscanf warning: 'z' is deprecated, consider using 'S' instead.
[19:51:39] sscanf warning: No default value found.
[19:51:39] sscanf warning: Strings without a length are deprecated, please add a destination size.
[19:51:39] sscanf warning: String buffer overflow.
Reply
#2

"uz" change to "us"
Reply
#3

now its says

Код HTML:
[21:44:56] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:44:56] sscanf warning: String buffer overflow.
Reply
#4

"uz" change to "us[128]"
Reply
#5

Quote:
Originally Posted by UnAngel
Посмотреть сообщение
now its says

Код HTML:
[21:44:56] sscanf warning: Strings without a length are deprecated, please add a destination size.
[21:44:56] sscanf warning: String buffer overflow.
us change to us[100]
Reply
#6

work thanks
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)