Difference between strtok and sscanf
#1

Hello guys, Of course you know, sscanf is the new way to make parameters in commands
i think everyone of you knows that already
But why do we use it?

In the old days, we used strtok to make parameters, now is sscanf
sscanf is a plugin with an include, and i don't like plugins, because they just....
like, if you installed it wrong, this may cause problems in your server, making the gamemode unknown or even crashing the server, why do you use it guys?

Strtok is a way that we used to do it in old days, i really like it than sscanf.
Replay with your opinion about these, and which one do you prefer, i prefer strtok, it's easier for people.
Reply
#2

Firstly, it's a lot faster. Secondly, SSCANF is a text processor, meaning not only is it used to create parameters. It can also be used to split a string.

You can also create custom specifiers. It can detect if a parameter is an integer, float, hex, etc.
Reply
#3

Some things are just not possible without plugins. If you don't want to use plugins for whatever reason then you're just fooling yourself. You get the most stable plugins by compiling them yourself on the machine they're going to run on, although that does require technical expertise.
Reply
#4

sscanf on top, simple and easy. Not even worth using strtok.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)