SA-MP Forums Archive
Help with loop vehicles - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help with loop vehicles (/showthread.php?tid=505505)



Help with loop vehicles - quark - 08.04.2014

PHP код:
public:Function()
{
        for(new 
idxidx<sizeof(DynamicCars); idx++)
          {
            if(
DynamicCars[idx][CarType] == 20)
            {
                
printf("> ID %d is type 20."idx);
                break;
            }
        }
   return 
1;

This code is giving me 999x (max car number is 999) this message in server log:
PHP код:
ID 0 is type 20. 
How to fix it? Today i tryied to fix this all day and didnt get an solution. Someone?


Re: Help with loop vehicles - quark - 08.04.2014

btw i have only id 0, 1, 2 and 3 as type 20


Re: Help with loop vehicles - Lidor124 - 08.04.2014

Post 'DynamicCars'


Re: Help with loop vehicles - quark - 08.04.2014

Now i'm on mobile phone later i'll post it. Btw i tryed with while, same error.


Re: Help with loop vehicles - quark - 08.04.2014

oh i think i found something. one problem is where the function is called