SA-MP Forums Archive
my filterscript not work after i put #include <sscanf2> - 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: my filterscript not work after i put #include <sscanf2> (/showthread.php?tid=447511)



my filterscript not work after i put #include <sscanf2> - Kuntum123 - 30.06.2013

hello my fs not work after i put #define <sscanf2>

before i put sscanf


Код:
----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3x, ©2005-2013 SA-MP Team

[21:01:34] 
[21:01:34] Server Plugins
[21:01:34] --------------
[21:01:34]  Loading plugin: Whirlpool
[21:01:34]  
[21:01:34]  ==================
[21:01:34]  
[21:01:34]   Whirlpool loaded
[21:01:34]  
[21:01:34]  ==================
[21:01:34]  
[21:01:34]   Loaded.
[21:01:34]  Loading plugin: sscanf
[21:01:34] 

[21:01:34]  ===============================

[21:01:34]       sscanf plugin loaded.     

[21:01:34]    © 2009 Alex "******" Cole

[21:01:34]  ===============================

[21:01:34]   Loaded.
[21:01:34]  Loading plugin: streamer
[21:01:34] 

*** Streamer Plugin v2.6.1 by Incognito loaded ***

[21:01:34]   Loaded.
[21:01:34]  Loaded 3 plugins.

[21:01:34] 
[21:01:34] Ban list
[21:01:34] --------
[21:01:34]  Loaded: samp.ban
[21:01:34] 
[21:01:34] 
[21:01:34] Filterscripts
[21:01:34] ---------------
[21:01:34]   Loading filterscript 'Sound.amx'...
[21:01:34] 
--------------------------------------
[21:01:34]  Song...
[21:01:34] --------------------------------------

[21:01:34]   Loaded 1 filterscripts.
pawn Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp>
#include <SII>
#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;
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;
}
after


Код:
----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3x, ©2005-2013 SA-MP Team

[21:00:45] 
[21:00:45] Server Plugins
[21:00:45] --------------
[21:00:45]  Loading plugin: Whirlpool
[21:00:45]  
[21:00:45]  ==================
[21:00:45]  
[21:00:45]   Whirlpool loaded
[21:00:45]  
[21:00:45]  ==================
[21:00:45]  
[21:00:45]   Loaded.
[21:00:45]  Loading plugin: sscanf
[21:00:45] 

[21:00:45]  ===============================

[21:00:45]       sscanf plugin loaded.     

[21:00:45]    © 2009 Alex "******" Cole

[21:00:45]  ===============================

[21:00:45]   Loaded.
[21:00:45]  Loading plugin: streamer
[21:00:45] 

*** Streamer Plugin v2.6.1 by Incognito loaded ***

[21:00:45]   Loaded.
[21:00:45]  Loaded 3 plugins.

[21:00:45] 
[21:00:45] Ban list
[21:00:45] --------
[21:00:45]  Loaded: samp.ban
[21:00:45] 
[21:00:46] 
[21:00:46] Filterscripts
[21:00:46] ---------------
[21:00:46]   Loading filterscript 'Sound.amx'...
[21:00:46]   Loaded 1 filterscripts.
pawn Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp>
#include <SII>
#include <sscanf>
#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;
}



Re: my filterscript not work after i put #include <sscanf2> - Kuntum123 - 30.06.2013

up ?


Re: my filterscript not work after i put #include <sscanf2> - Red_Dragon. - 30.06.2013

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;
}



Re: my filterscript not work after i put #include <sscanf2> - Cjgogo - 30.06.2013

Deleted!