Totally untested sscanf utilising code...#240
Conversation
|
Thanks for the PR! |
|
I saw the link, thanks. I'm working on building/testing it now (got past the cmake stage, so making progress). Any comments on the general idea? |
|
I'm all for it, as long as it's not too intrusive (which it isn't). |
|
I'll move those to the function itself - not finding the plugin is fine, unless you try calling the function. Actually, the code will not register the native if the sscanf plugin doesn't exist, because you can't call it, but then a user trying to call it without sscanf will get a "function not found" error, despite having the correct version loaded. That's even more confusing, so I could try check which natives they need from the AMX and print a more useful error if it is found in the header. |
I'm making this PR now as a work tracking PR (because hacktoberfest; if you could add the tag, that would be awesome). I've not tested most of it yet because I can't actually build the plugin (#239), but I know the sscanf lookup and RPC works thanks to other testing (Y-Less/micro). This adds a new function:
This is basically a wrapper around sscanf that passes the row data directly in and allows you to parse it with an sscanf-compatible specifier string. It actually looks for and uses the sscanf plugin (sscanf needs to come first), so there's very little overhead in the code, and if you don't want it just don't include both plugins.