30.06.2013, 13:20
You added sscanf instead of sscanf2. Use this
pawn Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
#include <SII>
#include <sscanf2>
#include <zcmd>
#define MAX_SONG 10
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Song...");
print("--------------------------------------\n");
return 1;
}
enum SInfo
{
Name,
Link
}
new SongInfo[MAX_SONG][SInfo];
new SID;
CMD:addurl(playerid,params[])
{
new Links,Names;
if(sscanf(params, "cc", Links, Names)) return SendClientMessage(playerid, 0xFF0000AA, "Usage: /addurl <> <Name>");
{
SongInfo[SID][Link] = Links;
SongInfo[SID][Name] = Names;
new file[40];
INI_Open(file);
format(file, sizeof(file), "Song/%i.ini", SID);
INI_WriteInt("Link", Links);
INI_WriteInt("Name", Names);
SID++;
}
return 1;
}