Problem SQL data
#1

Yo,

I've a problem with my data, I recovered the "newid" 1, 2, ..., 9 and NOT 15!

pawn Код:
new newid;
for(new i; i < rows; i++)
{
    newid                           = cache_get_field_content_int(i, "id");
    printf("%d", newid);
   
    bIntInfo[newid][bIntPos][0]     = cache_get_field_content_float(i, "posx");
    bIntInfo[newid][bIntPos][1]     = cache_get_field_content_float(i, "posy");
    bIntInfo[newid][bIntPos][2]     = cache_get_field_content_float(i, "posz");
    bIntInfo[newid][bIntPos][3]     = cache_get_field_content_float(i, "posa");
    bIntInfo[newid][bIntInterior]   = cache_get_field_content_int(i, "interior");
    bIntInfo[newid][bIntPrix]       = cache_get_field_content_int(i, "prix");
    cache_get_field_content(i, "name", bIntInfo[newid][bIntName]);
   
    printf("%d", newid);

    printf("Int ID %d - %s - %f/%f/%f/%f \n\n", newid, bIntInfo[newid][bIntName], arr4{ bIntInfo[newid][bIntPos] });
    Iter_Add(F_Interior, newid);
    nb = newid;
}
Код:
[23:07:51] 1
[23:07:51] 1
[23:07:51] Int ID 1 -  - 2324.520019/-1149.520019/1050.709960/359.268005 


[23:07:51] 2
[23:07:51] 2
[23:07:51] Int ID 2 -  - 318.558013/1114.489990/1083.880004/352.937988 


[23:07:51] 3
[23:07:51] 3
[23:07:51] Int ID 3 -  - 225.757003/1240.000000/1082.150024/0.000000 


[23:07:51] 4
[23:07:51] 4
[23:07:51] Int ID 4 -  - 1299.140014/-794.770019/1084.000000/0.000000 


[23:07:51] 5
[23:07:51] 5
[23:07:51] Int ID 5 -  - 2141.300048/-1602.560058/1505.270019/264.055999 


[23:07:51] 6
[23:07:51] 6
[23:07:51] Int ID 6 -  - 307.763000/1803.750000/-32.204101/330.209014 


[23:07:51] 7
[23:07:51] 7
[23:07:51] Int ID 7 -  - 2218.389892/-1076.300048/1050.479980/87.589202 


[23:07:51] 8
[23:07:51] 8
[23:07:51] Int ID 8 -  - 2283.070068/-1140.109985/1050.900024/357.661987 


[23:07:51] 9
[23:07:51] 9
[23:07:51] Int ID 9 -  - 2218.389892/-1076.300048/1050.479980/87.589202 


[23:07:51] 15


Thank you for your future help.
Jonas
Reply
#2

Tien un exemple que je me sert perso:

PHP код:

forward AtmLoad
();
public 
AtmLoad() 
{
    
AtmCount cache_get_row_count();
    for(new 
0AtmCount+1i++) 
    {
         
AtmInfo[i][aID] = cache_get_field_content_int(i-1"Atm_ID");
         
AtmInfo[i][aPos][0] = cache_get_field_content_int(i-1"Atm_PosX");
         
AtmInfo[i][aPos][1] = cache_get_field_content_int(i-1"Atm_PosY");
         
AtmInfo[i][aPos][2] = cache_get_field_content_int(i-1"Atm_PosZ");
         
AtmInfo[i][aPos][3] = cache_get_field_content_int(i-1"Atm_PosA");
         
AtmInfo[i][aCash] = cache_get_field_content_int(i-1"Atm_Cash");
         
AtmInfo[i][aEtat] = cache_get_field_content_int(i-1"Atm_Etat");

         if(
AtmInfo[i][aEtat] == 0)
         {
             
AtmInfo[i][aObject] = CreateObject(2943AtmInfo[i][aPos][0],AtmInfo[i][aPos][1],AtmInfo[i][aPos][2],AtmInfo[i][aPos][3],0,0);
         }

         if(
AtmInfo[i][aEtat] == 1)
         {
             
AtmInfo[i][aObject] = CreateObject(2754AtmInfo[i][aPos][0],AtmInfo[i][aPos][1],AtmInfo[i][aPos][2],AtmInfo[i][aPos][3],0,0);
         }

    }
    
printf("[MYSQL]: %d atm on йtй chargй",AtmCount);
    return 
1;

Reply
#3

Increase bIntInfo's size to more than 15.
Reply
#4

DAMN.

PHP код:
new bIntInfo[10][e_bILnfo];
new 
Iterator:F_Interior<MAX_INTERIEURS>; 
I was sure about me, I is not checked! Ty! A+
Reply
#5

Nolaix is stupid no problem
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)