Can you help?
#1

Does anyone sees anything wrong with this??
PHP код:
forward OrgsLoad();
public 
OrgsLoad()
{
    new 
rows cache_num_rows();
    if(
rows)
    {
        new 
index Iter_Free(i_Orgs);
         for(new 
irowsi++)
        {
            
cache_get_value_int(i"ID"OrgInfo[index][oID]);
            
cache_get_value_name(i"Name"OrgInfo[index][oName], 50);
            
cache_get_value_name(i"Leader"OrgInfo[index][oLeader], 50);
            
cache_get_value_name(i"Member1"OrgInfo[index][oMember1], 50);
            
cache_get_value_name(i"Member2"OrgInfo[index][oMember2], 50);
            
cache_get_value_name(i"Member3"OrgInfo[index][oMember3], 50);
            
cache_get_value_name(i"Member4"OrgInfo[index][oMember4], 50);
            
cache_get_value_name(i"Member5"OrgInfo[index][oMember5], 50);
            
cache_get_value_name(i"Member6"OrgInfo[index][oMember6], 50);
            
cache_get_value_name(i"Member7"OrgInfo[index][oMember7], 50);
            
cache_get_value_name(i"Member8"OrgInfo[index][oMember8], 50);
            
cache_get_value_name(i"Member9"OrgInfo[index][oMember9], 50);
            
cache_get_value_name(i"Member10"OrgInfo[index][oMember10], 50);
            
cache_get_value_float(i"ExitX"OrgInfo[index][oExitX]);
            
cache_get_value_float(i"ExitY"OrgInfo[index][oExitY]);
            
cache_get_value_float(i"ExitZ"OrgInfo[index][oExitZ]);
            
cache_get_value_float(i"IntX"OrgInfo[index][oIntX]);
            
cache_get_value_float(i"IntY"OrgInfo[index][oIntY]);
            
cache_get_value_float(i"IntZ"OrgInfo[index][oIntZ]);
            
cache_get_value_float(i"SefX"OrgInfo[index][oSefX]);
            
cache_get_value_float(i"SefY"OrgInfo[index][oSefY]);
            
cache_get_value_float(i"SefZ"OrgInfo[index][oSefZ]);
            
cache_get_value_int(i"Sef"OrgInfo[index][oSef]);
            
cache_get_value_int(i"Money"OrgInfo[index][oMoney]);
            
cache_get_value_int(i"Drugs"OrgInfo[index][oDrugs]);
            
cache_get_value_int(i"VW"OrgInfo[index][oVW]);
            
cache_get_value_int(i"Interior"OrgInfo[index][oInt]);
            
OrgInfo[i][orgExist] = true;
            
Iter_Add(i_Orgsindex);
            
OrgLabel(index);
        }
        
printf("Orgs loaded: %d"rows);
    }
    return 
1;

Reply
#2

The fact that you're never changing "index" after its first initialization, thereby overwriting the same slot over and over again.

Sidenote: member1 through member10 is not a proper way to store members. If a player can only be a member of one organization at a time then organizationID should be an attribute of player. Otherwise you need an association (see my sig).
Reply
#3

Quote:
Originally Posted by Vince
Посмотреть сообщение
The fact that you're never changing "index" after its first initialization, thereby overwriting the same slot over and over again.
How to do it?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)