Threaded query isn't being called.
#3

Everything seems fine in the logs, I'll try as an unthreaded query next.

@costel_nistor
Here is what I added
pawn Код:
public OnOriginQueryFinish(query[], resultid, extraid, connectionHandle)
{
    new rows, fields, content[128], field[20];
    cache_get_data(rows, fields, gConnection);
   
    switch(resultid) {
        case THREAD_LOAD_ORIGINS: {
            printf("Table ORIGINS returned %d rows", rows);
            for(new row=0; row<rows; row++) {
                printf("Loop call %d", row);
                cache_get_field_content(row, "id", field, gConnection);                     OriginInfo[row][oSQLid] = strval(content);
                cache_get_field_content(row, "Name", OriginInfo[row][oName], gConnection);
                cache_get_field_content(row, "X", content, gConnection);                    OriginInfo[row][oPos][0] = floatstr(content);
                cache_get_field_content(row, "Y", content, gConnection);                    OriginInfo[row][oPos][1] = floatstr(content);
                cache_get_field_content(row, "Z", content, gConnection);                    OriginInfo[row][oPos][2] = floatstr(content);
                cache_get_field_content(row, "rotZ", content, gConnection);                 OriginInfo[row][oPos][3] = floatstr(content);
                cache_get_field_content(row, "Interior", content, gConnection);             OriginInfo[row][oInt] = strval(content);
                cache_get_field_content(row, "VW", content, gConnection);                   OriginInfo[row][oVW] = strval(content);
                printf("Test");
               
                for(new f=0; f<4; f++) {
                    printf("Loop call %d for skins.", f);
                    format(field, sizeof(field), "male%d", f+1);
                    cache_get_field_content(row, field, content, gConnection);      OriginInfo[row][oMaleSkins][f] = strval(content);
                    format(field, sizeof(field), "female%d", f+1);
                    cache_get_field_content(row, field, content, gConnection);      OriginInfo[row][oFemaleSkins][f] = strval(content);
                }
               
                printf("ID %d, Name %s, X %f, Y %f, Z %f, RotZ %f, Interior %d, VW %d", OriginInfo[row][oSQLid], OriginInfo[row][oName], OriginInfo[row][oPos][0], OriginInfo[row][oPos][1], OriginInfo[row][oPos][2], OriginInfo[row][oPos][3], OriginInfo[row][oInt], OriginInfo[row][oVW]);
            }
        }
    }  
    return 1;
}
Server printed out
Код:
[13:53:12] Table ORIGINS returned 3 rows
[13:53:12] Loop call 0
[13:53:12] Test
[13:53:12] Loop call 0 for skins.
[13:53:12] Loop call 1 for skins.
[13:53:12] Loop call 2 for skins.
[13:53:12] Loop call 3 for skins.
I have no idea why the loop isn't reaching past the first iteration.
Reply


Messages In This Thread
Threaded query isn't being called. - by ReneG - 23.09.2012, 09:54
Re: Threaded query isn't being called. - by IstuntmanI - 23.09.2012, 10:27
Re: Threaded query isn't being called. - by ReneG - 23.09.2012, 19:39
Re: Threaded query isn't being called. - by ReneG - 27.09.2012, 03:17
Re: Threaded query isn't being called. - by ReneG - 01.10.2012, 07:48
Re: Threaded query isn't being called. - by Extremo - 01.10.2012, 07:59
Re: Threaded query isn't being called. - by ReneG - 01.10.2012, 08:23
Re: Threaded query isn't being called. - by Extremo - 01.10.2012, 08:27
Re: Threaded query isn't being called. - by ReneG - 01.10.2012, 08:28
Re: Threaded query isn't being called. - by Extremo - 01.10.2012, 08:30

Forum Jump:


Users browsing this thread: 3 Guest(s)