Mysql + SScanf = efficiency
#1

- SScanf FTW!

Today, i discovered the efficiency of sscanf.

pawn Код:
// Heres the enum of random shit.
enum SScanfData {
    SScanfString[128],
    SScanfInteger,
    Float:SScanfFloat,
    SScanfDimension[4]
}

new SScanf[MAX_PLAYERS][SScanfData];
// Heres the actual function
function SScanfTest()
{
    for(new i; i < 1; i++)
    {
        sscanf("SScanf is an great way to work with strings, right now i'm trying to make an string exact 128 characters long lets go further!§\
        13376335§1337.13371337§1§3§3§7"
,"p<§>e<s[128]ifiiii>",SScanf[i]);
        printf("SScanfString: %s",SScanf[i][SScanfString]);
        printf("SScanfInteger: %i",SScanf[i][SScanfInteger]);
        printf("SScanfFloat: %f",SScanf[i][SScanfFloat]);
        printf("SScanfDimension: %i",SScanf[i][SScanfDimension][0]);
        printf("SScanfDimension: %i",SScanf[i][SScanfDimension][1]);
        printf("SScanfDimension: %i",SScanf[i][SScanfDimension][2]);
        printf("SScanfDimension: %i",SScanf[i][SScanfDimension][3]);
    }
}
Try that example and you will see what i mean .

I made this thread to get help about this topic, solved it myself and decided to show an example of it.
Hope someone does take advantage of this.

Quote:
Originally Posted by ******
Посмотреть сообщение
there's no way to format enums in to format - however it would be an interesting project. I was debating a new format, similar to the one in YSI but as a plugin. This would be an excellent addition.
- Indeed
Reply


Messages In This Thread
Mysql + SScanf = Efficiency - by Cameltoe - 16.09.2010, 15:10
Re: Mysql + SScanf = efficiency - by Cameltoe - 17.09.2010, 13:47
Re: Mysql + SScanf = efficiency - by Cameltoe - 17.09.2010, 15:35
Re: Mysql + SScanf = efficiency - by Vince - 17.09.2010, 15:37

Forum Jump:


Users browsing this thread: 2 Guest(s)