ReturnNextunused.....
#1

Hello. I've made this:

pawn Код:
stock ReturnNextUnusedBankID()
{
    new bank[64];
    for(new b=0; b<=MAX_BANKS; b++){
    format(bank, sizeof(bank), "CLRP/Banks/%d", b);
    if(!dini_Exists(bank)) return b; }
    return 1;
}
But I want it to start at 1000000000 and go upwards. How to?
Reply
#2

Hm, like this?

pawn Код:
for(new b=1000000000; b<=MAX_BANKS + 1000000000; b++){
Reply
#3

Yes but for some reason, the script always choose Bank ID 1

http://pastebin.com/ww8LHanf
Reply
#4

bump
Reply
#5

bump -.-
Reply
#6

Why not just add 1000000000 to'b' whenever you use it?
Reply
#7

Quote:
Originally Posted by SilentHuntR
Посмотреть сообщение
Why not just add 1000000000 to'b' whenever you use it?
Thanks, worked.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)