30.04.2015, 05:48
Quote:
Tried.. sadly it's not working
pawn Код:
|
Tried.. sadly it's not working
pawn Код:
|
#include <sscanf2> #include <zcmd>
#include <zcmd> #include <sscanf2>
Yo Emmet_, do you plan on going through 3.0 and documenting it?
Also, I remember something being said about ranges, like "i<1-5>". Was this one of the 3.0 features? |
pawno\include\sscanf2.inc(33) : fatal error 111: user error: Please include <a_npc> or <a_samp> first. Compilation aborted. Pawn compiler 3.10.20150503 Copyright © 1997-2006, ITB CompuPhase 1 Error. [Finished in 0.1s]
#if defined _inc_a_npc #pragma library sscanf #elseif !defined _inc_a_samp #error Please include <a_npc> or <a_samp> first. #endif
sscanf(params, "u{'$'}d", id, amount)
sscanf(params, "u{'$'}d", id, amount)
Little help here.
I want to make it so that players can use /cmd [Username / ID] $500 or /cmd [Username / ID] 500. I tried pawn Код:
I want the $ to be optional. |
sscanf(params, "ud", id, amountStr)
if(amountStr[0] == '$') amount = strval(amountStr[1]);
else amount = strval(amountStr);
sscanf(params, "P<,$>ud", id, amount)
new id, amount, scanf1 = sscanf(params, "u{'$'}d", id, amount), scanf2 = sscanf(params, "ud", id, amount);
if(scanf1 && scanf2) return sendClientSyntax(playerid, "/givecash [playerid] [amount]");
What about sscanf 3.0 ? I heard that the only thing it is missing are the enumerators in I don't know what case, and I don't use at all the enumerators. Can somebody provide the plugins for it (.dll and .so) ? Also, there was a wiki, or something like that, for sscanf 3.0, is it still available somewhere ? sscanf 3.0 contains some new great specifiers which I would love to use.
|
sscanf 3.0 is already complete, Emmet is looking into it's release.
It's source is already on github btw, just compile it. |
The last time I heard something about it I heard that it isn't complete, that it is still missing enumerators in a specifier. (enumerators in quiet specifier, or something like that)
I can only compile it in Windows. |
SA-MP Dedicated Server ---------------------- v0.3.7, ©2005-2015 SA-MP Team [09:00:56] filterscripts = "" (string) [09:00:56] [09:00:56] Server Plugins [09:00:56] -------------- [09:00:56] Loading plugin: sscanf [09:00:56] Failed. [09:00:56] Loading plugin: streamer [09:00:56] *** Streamer Plugin v2.7.5.2 by Incognito loaded *** [09:00:56] Loaded. [09:00:56] Loading plugin: mysql [09:00:56] SA:MP MySQL Plugin v2.1.1 Loaded. [09:00:56] Loaded. [09:00:56] Loading plugin: nativechecker [09:00:56] [MySQL] Thread running. Threadsafe: Yes. [09:00:56] Loaded. [09:00:56] Loaded 3 plugins. [09:00:56] [09:00:56] Filterscripts [09:00:56] --------------- [09:00:56] Loaded 0 filterscripts. [09:00:56] Error: Function not registered: 'SSCANF_Init' [09:00:56] Error: Function not registered: 'SSCANF_IsConnected' [09:00:56] Error: Function not registered: 'SSCANF_Join' [09:00:56] Error: Function not registered: 'SSCANF_Leave' [09:00:56] Error: Function not registered: 'sscanf' [09:00:56] Script[gamemodes/CODMW.amx]: Run time error 19: "File or function is not found" [09:00:56] Number of vehicle models: 0