value doesn't increased
#1

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
Reply
#2

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

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
Reply
#4

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


Forum Jump:


Users browsing this thread: 1 Guest(s)