When I use sscanf2, my script doesnt load
#1

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.
Reply
#2

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?
Reply
#3

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]");
Reply
#4

Thanks, it was a newbie mistake

+rep'd even though it doesn't count
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)