[Plugin] sscanf - Now supports npcmodes
#21

Thanks Emmet for this!
Reply
#22

Quote:
Originally Posted by S4t3K
View Post
Do you plan to update it, as ****** used to do ?

Though, I don't know what you could add to this plugin. It's really complete atm. Maybe new useful specifiers ? Or functionnalities ?
Yeah, of course! I plan on adding some new things. I'm checking out sscanf3 right now and it's not bad.
Reply
#23

Quote:
Originally Posted by Crayder
View Post
Glad to see this Emmet_. One thing that really disappoints me about this thread (not in particular, just sscanf) is that he never released 3.0 (which I think I remember him saying was stable but he was cleaning).
^ that

seem like restoration process is going well but well ****** we still miss you
Reply
#24

sscanf 2.8.2
While 3.0 is not ready yet, I have released a small update which fixes a bug where the "u" specifier wasn't working correctly after a server restart.

Link with the .dll, .so and source:

https://dl.dropboxusercontent.com/u/...canf-2.8.2.zip
Reply
#25

Perfect!
Reply
#26

Quote:
Originally Posted by Emmet_
View Post
sscanf 2.8.2
While 3.0 is not ready yet, I have released a small update which fixes a bug where the "u" specifier wasn't working correctly after a server restart.

Link with the .dll, .so and source:

https://dl.dropboxusercontent.com/u/...canf-2.8.2.zip
Weird I never experienced this bug.
Reply
#27

@Emmet_ : If you need some small help, I'm a little bit experienced with C++, so I'll gladly help you out.

@Kar : Me neither, though, if he took the time to correct the bug, it means that it has been reported at least once.
Reply
#28

Quote:
Originally Posted by Kar
View Post
Weird I never experienced this bug.
It only happens under certain circumstances. It's a pretty rare bug, though. I only experienced it a few times when I was an admin at another server.
Reply
#29

Just a question why he deleted it?
Reply
#30

Quote:
Originally Posted by AroseKhanNiazi
View Post
Just a question why he deleted it?
He deleted all of his topics because he left SA-MP.

https://sampforum.blast.hk/showthread.php?pid=3431155#pid3431155
Reply
#31

It's great to see that you are going to continue to update it!
Reply
#32

Thanks for fixing u specifier.
Reply
#33

Thanks For Reuploading his work and also updating it..
Reply
#34

Quote:
Originally Posted by Emmet_
Посмотреть сообщение
He deleted all of his topics because he left SA-MP.

https://sampforum.blast.hk/showthread.php?pid=3431155#pid3431155
....
Reply
#35

Sad to see Alex leave, but everyone can't go on doing the same things everyday.

Thanks for taking over sscanf though Emmet. I've always liked your work, so hopefully you can work with this.
Reply
#36

Can someone help me parse this correctly? I've been having a hard time without a string buffer overflow warning.

pawn Код:
objectid, "text", 0, 50, "text2", 0, 0, 0xFFFFFFFF, 0xFFFFFFFF, 0
Reply
#37

Quote:
Originally Posted by Kar
Посмотреть сообщение
Can someone help me parse this correctly? I've been having a hard time without a string buffer overflow warning.

pawn Код:
objectid, "text", 0, 50, "text2", 0, 0, 0xFFFFFFFF, 0xFFFFFFFF, 0
Somewhere along the lines of this, however I don't remember how ****** told me how to escape quotes (but I think he was fixing the problem with that, it may be fixed in 2.8+).

"p<,\">is[32]iis[32]iixxi"

Also you may want to try enum specifiers, I never got in to it too deep but it may be useful here.

Код:
enum Parse_Detail
{
    E_obj,
    E_text[32],
    E_dat1,
    E_dat2,
    E_text[32],
    E_dat3,
    E_dat4,
    E_hex1,
    E_hex2,
    E_dat5,
}

main
{
    new
        var[Parse_Detail];
    sscanf(string, "p<,\">e<is[32]iis[32]iixxi>", var); //If the quote is not escaped just remove the escape and remove the quotes afterwards...
}
Reply
#38

You escape any character by doing \c (replace c with the character of your choice).

Also

"p<,\">is[32]iis[32]iixxi"

Can't work.

1. It's P if your using 2 specifiers.

2. '"text", 50'

Check this, it's gonna try to get the string for the first ", which is why the first " should be ignored, then its gonna try to get a param between " and , because they are right next to each other and thats gonna throw a warning.
Reply
#39

Quote:
Originally Posted by Kar
Посмотреть сообщение
You escape any character by doing \c (replace c with the character of your choice).

Also

"p<,\">is[32]iis[32]iixxi"

Can't work.

1. It's P if your using 2 specifiers.

2. '"text", 50'

Check this, it's gonna try to get the string for the first ", which is why the first " should be ignored, then its gonna try to get a param between " and , because they are right next to each other and thats gonna throw a warning.
Perhaps you didn't see my second explanation. Yes you are right, but check out the enumerator version.
Reply
#40

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


Forum Jump:


Users browsing this thread: 1 Guest(s)