Help /facpay wount work!
#4

Quote:
Originally Posted by priit123
Посмотреть сообщение
So in save in need to change the "fpay1" to "fpay[1]" ?
PHP код:
// array starts at 0 instead of 1, so it is 0-10 instead of 1-11
dini_Set(file"Pay1"FacInfo[1][fPay][0]);
dini_Set(file"Pay2"FacInfo[1][fPay][1]);
dini_Set(file"Pay3"FacInfo[1][fPay][2]);
// ...
dini_Set(file"Pay9"FacInfo[1][fPay][8]);
dini_Set(file"Pay10"FacInfo[1][fPay][9]);
dini_Set(file"Pay11"FacInfo[1][fPay][10]); 
But you could also use an loop
PHP код:
for(new 0key[16]  = "Pay"<= 10; ++i) {
    
valstr(key[3], 1); // faster than format
    
dini_Set(filekeyFacInfo[1][fPay][i]); // dini is quite old and slow
    // if you feel that your SaveFactions takes to long try to update to a newer filesystem or use a database

just noticed you got
PHP код:
format(filesizeof(file), "factions/LSPD.ini"); 
twice in your code
Reply


Messages In This Thread
Help /facpay wount work! - by priit123 - 20.02.2019, 22:29
Re: Help /facpay wount work! - by Nero_3D - 21.02.2019, 02:29
Re: Help /facpay wount work! - by priit123 - 21.02.2019, 15:36
Re: Help /facpay wount work! - by Nero_3D - 21.02.2019, 18:33
Re: Help /facpay wount work! - by priit123 - 21.02.2019, 19:09
Re: Help /facpay wount work! - by Nero_3D - 22.02.2019, 01:08

Forum Jump:


Users browsing this thread: 1 Guest(s)