SA-MP Forums Archive
value doesn't increased - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: value doesn't increased (/showthread.php?tid=618201)



value doesn't increased - Bondz - 02.10.2016

PHP код:
public BusinessTimer()
{
    foreach(new 
Business)
    {
        if((
gettime() - BusinessData[i][LastVisited]) > BUSINESS_DAYS 86400)
        {
            
Business_Reset(i);
            continue;
        }
        if(!
BusinessData[i][Closed] && BusinessData[i][SalePrice] == && strcmp(BusinessData[i][Owner], "-"))
        {
            if(
IsPlayerConnected(BusinessData[i][Owner])
            {
                
BusinessData[i][Money] += BusinessData[i][Earning];
                 
BusinessData[i][Save] = true;
            }
        }
        if(
BusinessData[i][Save]) Business_Save(i);
    }
    return 
1;

it doesn't work even the owner of the business is connected
the code should work and the earning is increased,but it doesnt


Re: value doesn't increased - Dutheil - 02.10.2016

BusinessData[i][Owner] is an array or a value ?


Re: value doesn't increased - Bondz - 03.10.2016

Quote:
Originally Posted by Dutheil
Посмотреть сообщение
BusinessData[i][Owner] is an array or a value ?
it's an array(my bad)
i put value on the thread title because of the earnings doesn't increased


Re: value doesn't increased - SickAttack - 03.10.2016

Debug your code, the only proper way to find out.