Re: sscanf v2.8.1 - Now supports npcmodes -
Crayder - 30.04.2015
Quote:
Originally Posted by Kar
Tried.. sadly it's not working
pawn Код:
sscanf(funcargs, "p<,>e<s[32]iis[32]iixxi>", matTextParseData); printf(" DEBUG: [eventLoadMap] Object Text: '%s', %d, %d, '%s', %d, %d, %x, %x, %d", matTextParseData[tmpObjText], matTextParseData[tmpObjIdx], matTextParseData[tmpObjMatSize], matTextParseData[tmpObjFont], matTextParseData[tmpObjFontSize], matTextParseData[tmpObjBold], matTextParseData[tmpObjFontCol], matTextParseData[tmpObjBackCol], matTextParseData[tmpObjAlign]);
|
I noticed I forgot to capitalize the p, I was coming to tell you but you noticed obviously. Anyways, it will not work with the quotes for the reason you stated above, have you tried without the quote escape? In this case it would in fact be lowercase too. With this the strings will contain the quote characters so trim the ends off of the strings before using them. I edited your code in the quote.
Re: sscanf v2.8.1 - Now supports npcmodes -
LordFede - 30.04.2015
Silly question! In case I want to use sscanf2 with zcmd
which one is the best practice?
This
Код:
#include <sscanf2>
#include <zcmd>
or this?
Код:
#include <zcmd>
#include <sscanf2>
Re: sscanf v2.8.1 - Now supports npcmodes -
SickAttack - 30.04.2015
Quote:
Originally Posted by LordFede
Silly question! In case I want to use sscanf2 with zcmd
which one is the best practice?
This
Код:
#include <sscanf2>
#include <zcmd>
or this?
Код:
#include <zcmd>
#include <sscanf2>
|
It's the same thing.
Re: sscanf v2.8.1 - Now supports npcmodes -
Clergy - 30.04.2015
Good job my friend :P
Re: sscanf v2.8.1 - Now supports npcmodes -
Crayder - 03.05.2015
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?
Re: sscanf v2.8.1 - Now supports npcmodes - Emmet_ - 03.05.2015
Quote:
Originally Posted by Crayder
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?
|
Sure, I just need to look through the code and run some tests first. ****** mentioned that 3.0 was in a finished state aswell, so that's a great thing
I believe ranges do exist aswell.
Re: sscanf v2.8.1 - Now supports npcmodes -
m0k1 - 04.05.2015
2.8.2 have a bug with Zeex's compiler ...
Код:
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]
I "bypassed" this by removing
Код:
#if defined _inc_a_npc
#pragma library sscanf
#elseif !defined _inc_a_samp
#error Please include <a_npc> or <a_samp> first.
#endif
But i don't think it's a good solution.
Re: sscanf v2.8.1 - Now supports npcmodes -
Whizion - 05.05.2015
Same question as i asked in the streamer plugin thread, is this updated for 0.3.7 or no update is necessary?
Re: sscanf v2.8.1 - Now supports npcmodes - Emmet_ - 05.05.2015
An update is unnecessary. sscanf works fine for me on 0.3.7.
@m0k1: I should remove that error in the next version. For now just remove the #elseif bit.
Re : sscanf v2.8.1 - Now supports npcmodes -
Dutheil - 20.05.2015
I do not really understand what is the specifier "g - Float with IEEE definitions"
Re: sscanf v2.8.1 - Now supports npcmodes -
Kar - 04.06.2015
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 Код:
sscanf(params, "u{'$'}d", id, amount)
but that makes it require the $.
I want the $ to be optional.
Re: sscanf v2.8.1 - Now supports npcmodes -
Crayder - 04.06.2015
@Kar. You can simply use two statements instead of one.
For example first check using the line you provided above.
pawn Код:
sscanf(params, "u{'$'}d", id, amount)
If that statement is returned true (not false or 0), use a standard "ud" check after.
Re: sscanf v2.8.1 - Now supports npcmodes -
DRIFT_HUNTER - 04.06.2015
Quote:
Originally Posted by Kar
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 Код:
sscanf(params, "u{'$'}d", id, amount)
but that makes it require the $.
I want the $ to be optional.
|
Well the simple way would be to require money ammount as string, check if first character is $ and use strval...
pawn Код:
sscanf(params, "ud", id, amountStr)
if(amountStr[0] == '$') amount = strval(amountStr[1]);
else amount = strval(amountStr);
EDIT: I was pretty sure these is possible with sscanf only and it is xD
pawn Код:
sscanf(params, "P<,$>ud", id, amount)
Just set multiple delimiters and thats it
Oh and by the way, that one accepts almost anything...
PlayerID 999
PlayerID $999
PlayerID 999$
Re: sscanf v2.8.1 - Now supports npcmodes -
Kar - 04.06.2015
I already made the temporary workaround
pawn Код:
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]");
Ah I keep forgetting about multiple Delimiters. Thanks, I'll work with that.
Re: sscanf v2.8.1 - Now supports npcmodes -
IstuntmanI - 09.06.2015
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.
Re: sscanf v2.8.1 - Now supports npcmodes -
Crayder - 09.06.2015
Quote:
Originally Posted by IstuntmanI
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.
Re: sscanf v2.8.1 - Now supports npcmodes -
IstuntmanI - 09.06.2015
Quote:
Originally Posted by Crayder
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.
Re: sscanf v2.8.1 - Now supports npcmodes -
Crayder - 09.06.2015
Quote:
Originally Posted by IstuntmanI
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.
|
Nope, Y-Less completed it before his departure; although, he removed all instances of it. He gave the source (packaged in the sscanf 2 source) back when he gave YSI 4.0 back.
*coughs*
*cough* Check out Emmet's, it'll probably be maintained there. *cough*
Re: sscanf v2.8.1 - Now supports npcmodes -
LocMax - 16.06.2015
I had my computer formatted yesterday, I downloaded a fresh SA-MP windows server files, placed my gamemode from USB and installed all fresh plugins, however I am getting error 19 - file or function not found.
This is what nativechecker says:
Код:
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
How to fix it?
Re: sscanf v2.8.1 - Now supports npcmodes -
DRIFT_HUNTER - 16.06.2015
I think you are using old include (the one that does not use plugin)
Try updating both plugin and include, and make sure you dont have more than one pawno on your PC
EDIT: Just noticed that your sscanf plugin does not load.
Install c++ redistributable packages