Integer isn't loading in its enum
#2

Add these on your OnPLayerLoad and show us the results

PHP код:
printf("ID without handler: %i",cache_get_field_content_int(i"id"));
printf("ID with handler: %i",cache_get_field_content_int(i"id"dbhandle)); 
Also why bother making a loop for car ids too?
Loops start at SQL at 1 (AUTO_INCREMENT) if im correct and MAX_VEHICLES start at 0.
So there will be 1 ID difference in it.

For example

PHP код:
#define MAX_SOMETHING 255 //starts at 0, ends at 255
new MyVar[MAX_SOMETHING];
public 
SomeCallback() {
    new 
rows cache_num_rows();
    for(new 
i=0rowsi++) {
        new 
calc i-1//calling row 1 at start and our MAX_SOMETHNIG starts at 0, therefore sub 1 to the MAX_SOMETHING
        
MyVar[calc] = cache_get_field_content_int(i,"Something");
    }

EDIT: proper calculation is actually new calc = i-1; since rows start at 1 and car ids at 0
Reply


Messages In This Thread
Integer isn't loading in its enum - by justjamie - 09.06.2016, 13:47
Re: Integer isn't loading in its enum - by TwinkiDaBoss - 09.06.2016, 14:02
Re: Integer isn't loading in its enum - by justjamie - 09.06.2016, 14:07
Re: Integer isn't loading in its enum - by TwinkiDaBoss - 09.06.2016, 14:13
Re: Integer isn't loading in its enum - by justjamie - 09.06.2016, 14:15
Re: Integer isn't loading in its enum - by justjamie - 09.06.2016, 14:37

Forum Jump:


Users browsing this thread: 2 Guest(s)