04.06.2012, 11:54
Well my command is not working right I am sure I am missing something really basic but I just cant see what.
What is wrong with this?
It says in the server log:
[07:59:41] sscanf warning: Strings without a length are deprecated, please add a destination size.
[07:59:41] sscanf warning: String buffer overflow.
Quote:
{ new PID, reason[35], pName[MAX_PLAYER_NAME], Sender[MAX_PLAYER_NAME]; if(sscanf(params, "us", PID, reason)) return SendClientMessage(playerid, 0xFF0000FF, "Usage: /PM [playerid/partofname] [message]"); if(!IsPlayerConnected(PID)) return SendClientMessage(playerid, 0xFF0000FF, "That user is not connected!"); else { new Str[256]; GetPlayerName(PID, pName, sizeof(pName)); GetPlayerName(playerid, Sender, sizeof(Sender)); format(Str, sizeof(Str), "(( PM From: %s(%d): %s ))", Sender, playerid, reason); SendClientMessage(PID, 0xF6C861AA, Str); format(Str, sizeof(Str), "(( PM Sent To: %s(%d): %s ))", pName, PID, reason); SendClientMessage(playerid, 0xF6C861AA, Str); } return 1; } |
It says in the server log:
[07:59:41] sscanf warning: Strings without a length are deprecated, please add a destination size.
[07:59:41] sscanf warning: String buffer overflow.