SA-MP Forums Archive
When I use sscanf2, my script doesnt load - 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: When I use sscanf2, my script doesnt load (/showthread.php?tid=324839)



When I use sscanf2, my script doesnt load - nitrochegs - 11.03.2012

Hello all,

Whenever I try to make a command using sscanf, my script doesn't load. When I start the server it comes up with:
Код:
SA-MP Dedicated Server
----------------------
v0.3d-R2, ©2005-2011 SA-MP Team

[12:01:02] filterscripts = ""  (string)
[12:01:02] 
[12:01:02] Server Plugins
[12:01:02] --------------
[12:01:02]  Loaded 0 plugins.

[12:01:02] 
[12:01:02] Filterscripts
[12:01:02] ---------------
[12:01:02]   Loaded 0 filterscripts.

[12:01:02] Script[gamemodes/CNR.amx]: Run time error 19: "File or function is not found"
[12:01:02] Number of vehicle models: 0
Here is the code I am using that doesn't allow the server to start up for some reason:
pawn Код:
CMD:me(playerid,params[])
{
    new string[128], message[128], pname[24];
    GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
    if(sscanf(params, "sz", message)) return SendClientMessage(playerid, red, "ERROR:{FFFFFF} /me [message]");
    format(string, sizeof(string), "* %s %s", pname, message);
    SendClientMessageToAll(yellow, string);
    return 1;
}
Whenever I comment out that code, the server starts fine, and everything works fine.

Any idea of what's wrong?

And yes I have
pawn Код:
#include <sscanf2>
at the top of my script.


Re: When I use sscanf2, my script doesnt load - Reklez - 11.03.2012

This is sscanf2 plugin problem, did you make sure that you have sscanf2 plugin?, did you get any pop up window message during opening samp-server.exe?


Re: When I use sscanf2, my script doesnt load - eesh - 11.03.2012

pawn Код:
[12:01:02] Server Plugins
[12:01:02] --------------
[12:01:02]  Loaded 0 plugins.
You dont have sscanf plugin in your plugins folder and server.cfg.

https://sampforum.blast.hk/showthread.php?tid=120356

use that.

after that change

pawn Код:
if(sscanf(params, "sz", message)) return SendClientMessage(playerid, red, "ERROR:{FFFFFF} /me [message]");
to
pawn Код:
if(sscanf(params, "s", message)) return SendClientMessage(playerid, red, "ERROR:{FFFFFF} /me [message]");



Re: When I use sscanf2, my script doesnt load - nitrochegs - 11.03.2012

Thanks, it was a newbie mistake

+rep'd even though it doesn't count