SA-MP Forums Archive
Errors - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Errors (/showthread.php?tid=351609)



Errors - tixzor - 16.06.2012

1.
Код:
[05:16:34] sscanf warning: 'z' is deprecated, consider using 'S' instead.
[05:16:34] sscanf warning: No default value found.
[05:16:34] sscanf warning: Strings without a length are deprecated, please add a destination size.
[05:16:47] sscanf warning: 'z' is deprecated, consider using 'S' instead.
[05:16:47] sscanf warning: No default value found.
[05:16:47] sscanf warning: Strings without a length are deprecated, please add a destination size.
2.
Код:
[08:28:37]  ======================================= 
[08:28:37]  |                                     | 
[08:28:37]  |   Error: Could not connect to YSI   | 
[08:28:37]  |  update server (response was 003).  | 
[08:28:37]  |                                     | 
[08:28:37]  ======================================= 
[08:28:37]



Re: Errors - Kindred - 16.06.2012

Show us some code for god sakes, we can't help you without it.

pawn Код:
if(sscanf(params,"uz
Above is what they meant by "'z' is deprecated, consider using 'S' instead.

That means you should change it to something like this:

pawn Код:
if(sscanf(params,"uS[sizeofstringhere]
Otherwise, the second thing you posted doesn't matter. That simply says it can't connect to the update server to check if you have the latest version of YSI.


Re: Errors - tixzor - 16.06.2012

Quote:
Originally Posted by Kindred
Посмотреть сообщение
Show us some code for god sakes, we can't help you without it.

pawn Код:
if(sscanf(params,"uz
Above is what they meant by "'z' is deprecated, consider using 'S' instead.

That means you should change it to something like this:

pawn Код:
if(sscanf(params,"uS[sizeofstringhere]
Otherwise, the second thing you posted doesn't matter. That simply says it can't connect to the update server to check if you have the latest version of YSI.
Thanks for reply.

Код:
CMD:report(playerid,params[])
{
	new id, reason[35], string[128], sendername[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME];
	if(sscanf(params,"uz", id, reason)) return SendClientMessage(playerid, COLOR_SYNTAX,"[SYNTAX]: /report [PlayerID] [Reason]");
	if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_ERROR,"[ERROR]: Invalid player ID");
	else
	{
		GetPlayerName(id, name,sizeof(name));
		GetPlayerName(playerid, sendername, sizeof(sendername));
		sendername[strfind(sendername,"_")] = ' ';
 		format(string, sizeof(string), "[ID:%d] %s has reported %s: %s.", playerid, sendername, name, reason);
		ABroadCast(COLOR_YELLOW,string,1);
		format(string, sizeof(string), "[INFO]: Use /markfalse [ID] or /acceptreport [ID]");
		ABroadCast(COLOR_YELLOW,string,1);
		format(string, sizeof(string), "[INFO]: Your report was just send to the online admins, please wait for a reply");
		SendClientMessage(playerid,GREEN,string);
		PlayerNeedsHelp[playerid] = 1;
		return 1;
	}
}