Is this even possible?
#1

Hello, I just find out why something was not working and it's wierd.

Here it is:
pawn Код:
printf("%d",slot); //returns 0
        printf("%d cars selected",rows); //returns 5
        for(new id = 0; id < rows; id++)
        {
            printf("%d",slot); //returns 0
            cache_get_field_content(id, "ID", data[0]);
            cache_get_field_content(id, "MAP", data[1]);
            cache_get_field_content(id, "TYPE", data[2]);
            cache_get_field_content(id, "OWNER_ID", data[3]);
            cache_get_field_content(id, "MODEL", data[4]);
            cache_get_field_content(id, "PERMISSION", data[5]);
            cache_get_field_content(id, "COMPONENTS", data[6]);
            cache_get_field_content(id, "COLOR_ONE", data[7]);
            cache_get_field_content(id, "COLOR_TWO", data[8]);
            cache_get_field_content(id, "POSITION", data[9]);
            cache_get_field_content(id, "RESPAWN", data[10]);
            cache_get_field_content(id, "LABEL", data[11]);
            cache_get_field_content(id, "INFO", data[12]);
            printf("%d",slot); //returns 44 scary?
This is just a small part of a function
The thing is, after the forloop line it becomes 44...
But it should stay on 0.
This is just no logical reason that this changes, somebody can help me?
Reply
#2

It depends what data is equaling to?

try giving a little more info on it

-- EDIT --

As far as i understand im guessing this is getting data from a mysql db and i'm thinking that its looping around all of the rows in the database and somehow its adding the total amount of rows or the data within a specific row
Reply
#3

Well but what does the mysql function has to do with the slot variable (shit english)
Reply
#4

Are you using mysql?

if yes then im guessing there data in your table and its getting picked up by it

else

You need to give more information about your situation. Like where the data is comming from and how you are recieving it
Reply
#5

Resloved, seems that the output of cache_get_field_content was to big sized.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)