String factorial (length 24)
#1

How to make for loop for all possible allowed NICK characters length of 24 characters

So, first for loop will do with lenght of 3 characters, beacuse NICK in samp must be 3+ characters and for loop will print all possible ways of that characters

ABC
ACB
BAC
BCA
CAB
CBA

and then will do same think with 4 characters, in example i use JUST A B C but how to make with HOLE alphabet and numbers too?
Reply
#2

CABCA
Reply
#3

I cannot think of a reason you would need this. It would also take VERY LONG to actually do this operation. So if you give us the 'why' behind you wanting to do this, we can give a healthy alternative.
Reply
#4

Just STFU and use new string[128];

and BTW who the hell want to use only 3 or 4
Reply
#5

Yes i know it will take VERY VERY LONG, i wanna that because i use .ini file system saving and i have about 2,000 users in folder and with this alogirm that i ask for i can check how much registred account's i have with EVRY way that alogirtm give i can use

pawn Код:
if(fexist(...))
{
     printf("ACCOUNT ID: %i", ...);
}
and other thinks like, loop throudh hole user folder
i know it not best way to do it but idk how i can make that without this method
Reply
#6

A much better solution would to be create another file that holds a single value, and increment that value each time someone registers. That way, when you need to know how many accounts there are, just open that one file and read the value.
Reply
#7

I think about that already, tny but i just wanna loop once that folder and i think this solution is best never mind how long it takes that i get results... I need that algoritm
Reply
#8

Thanks ******, wow that is too long
I think i will start with switching my gamemode on mySQL but i will try with y_users and with file plugin
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)