SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Reply
 
Thread Tools Display Modes
Old 18/04/2011, 07:28 PM   #931
Ernis456
Big Clucker
 
Join Date: Jul 2010
Location: Lithuania
Posts: 180
Reputation: -4
Default Re: sscanf 2.0 - IMPORTANT UPDATE - 16/04/11

Quote:
Note however that the .so file hasn't been updated yet
so it means update dont work with Linux ? If yes when you update it ?
Ernis456 is offline   Reply With Quote
Old 18/04/2011, 09:50 PM   #932
xxmitsu
Gangsta
 
Join Date: Feb 2009
Posts: 629
Reputation: 35
Default Re: sscanf 2.0 - IMPORTANT UPDATE - 16/04/11

Quote:
Originally Posted by Ernis456 View Post
so it means update dont work with Linux ? If yes when you update it ?
Read the entire paragraph!

Quote:
Edit: Now it has been thanks to Calg00ne.
__________________
aka xanto - Retired - Former eGaming.ro technical staff.
xxmitsu is offline   Reply With Quote
Old 19/04/2011, 02:19 AM   #933
nemesis-
Huge Clucker
 
Join Date: Sep 2009
Location: USA
Posts: 249
Reputation: 37
Default Re: sscanf 2.0 - IMPORTANT UPDATE - 16/04/11

Quote:
Originally Posted by gamer931215 View Post
Hmm strange, never noticed a bug in sscanf2
anyway thanks for the fix, il update my plugin soon
You won't if your leveraging of sscanf2 are simplistic with a minimal specifier count. You start to notice strange occurrences when you have specifiers of 40-50 fields of varying patterns.


Quote:
Originally Posted by Y_Less View Post
This update fixes a possible crash. I'm not going to say more than that because it's not generally wise to spread information on how to crash servers which haven't updated yet. As for "large number", care to elaborate? I know that quiet sections after the final parameter give a warning that there are insufficient parameters when there aren't and that name detection could be better, but that's it. If there are more please say - I can only (possibly get round to) fix what is reported!
I've sent you PMs and made posts earlier in this thread regarding oddities when you have a specifier, for example, s[32]ds[32]. The last string specifier will ALWAYS return a warning despite there being no ending quiet section. This was the most glaring bug. My server on startup gets a nice huge flood of warning messages because of it.
nemesis- is offline   Reply With Quote
Old 19/04/2011, 08:58 AM   #934
Y_Less
Beta Tester
 
Y_Less's Avatar
 
Join Date: Jun 2008
Location: 629 - git.io/Y
Posts: 18,150
Reputation: 2540
Default Re: sscanf 2.0 - IMPORTANT UPDATE - 16/04/11

Oh, OK sorry. Those bugs are on my list of things to sort out, but as you said they're not high priority because sscanf still works.
Y_Less is offline   Reply With Quote
Old 19/04/2011, 07:21 PM   #935
nemesis-
Huge Clucker
 
Join Date: Sep 2009
Location: USA
Posts: 249
Reputation: 37
Default Re: sscanf 2.0 - IMPORTANT UPDATE - 16/04/11

Quote:
Originally Posted by Y_Less View Post
Oh, OK sorry. Those bugs are on my list of things to sort out, but as you said they're not high priority because sscanf still works.
I'm also waiting for arrays in enums support .
nemesis- is offline   Reply With Quote
Old 20/04/2011, 03:22 PM   #936
kLx
Huge Clucker
 
kLx's Avatar
 
Join Date: Feb 2008
Posts: 240
Reputation: 6
Default Re: sscanf 2.0 - IMPORTANT UPDATE - 16/04/11

Quote:
Originally Posted by nemesis- View Post
I'm also waiting for arrays in enums support .
Most waited feature, of all time <3
__________________
Out of bussiness
kLx is offline   Reply With Quote
Old 20/04/2011, 11:25 PM   #937
Y_Less
Beta Tester
 
Y_Less's Avatar
 
Join Date: Jun 2008
Location: 629 - git.io/Y
Posts: 18,150
Reputation: 2540
Default Re: sscanf 2.0 - IMPORTANT UPDATE - 16/04/11

That is just hard to do, both enums and arrays take a lot of code (check the source - they each have separate files).

And of course sscanf is open source for this reason - if you want something, add it!
Y_Less is offline   Reply With Quote
Old 21/04/2011, 07:15 AM   #938
leong124
High-roller
 
leong124's Avatar
 
Join Date: Jun 2008
Location: Hong Kong, China
Posts: 1,738
Reputation: 134
Default Re: sscanf 2.0 - IMPORTANT UPDATE - 16/04/11

Hey Y_Less, I've a suggestion about the escaping symbol(backslash).
I think such kind of symbols in the string will affect the ordinal use.
For example, someone wants to type a command like "/pm 0 /_\" as I said,
while some will want to send a string with spaces like "/buycar Streak\ Trailer 1 1".

I hope the escaping function will be changed as one of the parameters.
Let's say the new parameter is "x", and its usage is:
pawn Code:
sscanf("hello world ! 1234567","x<3>[128]d",string,number);
the "<3>" means it will read 3 string parameters while "[128]" is the buffer size.
However players cannot do things like "/buycar Streak\ Trailer 1 1" again as the function goes server side.

Another method. I guess if a new string parameter can be added such that it will not recognise the backslash function.
Again, let's say "x" is the new parameter and it usage is:
pawn Code:
sscanf("Hello\ world\ ! 1234567","s[128]d",string,number);
sscanf("Hello\ world\ ! 1234567","x[32]x[32]x[32]d",string2,string3,string4,number2);
Note that "[32]" is the buffer size(Just like the "s" parameter).
Here "string" will be "Hello world !" while "string2" is "Hello\","string3" is "world\" and "string4" is "!".
Adding such parameters will solve the backslash problem I think.
__________________
[KDT_MS]hk_shade

Sorry for my bad English and my weakness in expressing myself.
leong124 is offline   Reply With Quote
Old 21/04/2011, 09:17 AM   #939
Y_Less
Beta Tester
 
Y_Less's Avatar
 
Join Date: Jun 2008
Location: 629 - git.io/Y
Posts: 18,150
Reputation: 2540
Default Re: sscanf 2.0 - IMPORTANT UPDATE - 16/04/11

If you want a backslash use "\\" like in PAWN and many other languages.
Y_Less is offline   Reply With Quote
Old 21/04/2011, 11:03 AM   #940
kLx
Huge Clucker
 
kLx's Avatar
 
Join Date: Feb 2008
Posts: 240
Reputation: 6
Default Re: sscanf 2.0 - IMPORTANT UPDATE - 16/04/11

Quote:
Originally Posted by Y_Less View Post
That is just hard to do, both enums and arrays take a lot of code (check the source - they each have separate files).

And of course sscanf is open source for this reason - if you want something, add it!
We know it's hard, but you have already did some stuff thath no-one even imagined that it's possible in sa-mp :}
__________________
Out of bussiness
kLx is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macros (?) for enums/arrays MP2 Scripting Help 16 17/01/2012 08:37 PM
Enums - string arrays SuperViper Scripting Help 3 31/10/2011 11:00 AM
Arrays and enums... [MWR]Blood Scripting Help 9 23/09/2011 11:29 AM
Enums and Arrays Th3Angel Help Archive 6 15/02/2011 12:46 AM


All times are GMT. The time now is 06:53 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.