[PROBLEM COMPILING] - Filterscript
#8

Quote:
Originally Posted by clavador
I've found a working way, but every car is the same:
You need to get random number for every vehicle, not only once:
pawn Код:
new size = sizeof(Normal_Cars);

    AddStaticVehicle(Normal_Cars[random(size)], .....);
    AddStaticVehicle(Normal_Cars[random(size)], .....);
    AddStaticVehicle(Normal_Cars[random(size)], .....);
    AddStaticVehicle(Normal_Cars[random(size)], .....);
    ......
Quote:
Originally Posted by clavador
I still don't know why it fails to compile when I use the Randoms Outside the Callbacks.
Quote:
Originally Posted by pawn-lang.pdf
A global declaration appears outside a function and a global variable
is accessible to any function. Global data objects can only be
initialized with constant expressions.
==> you cannot initialize global variables using any functions or other variables.
Reply


Messages In This Thread
[PROBLEM COMPILING] - Filterscript - by clavador - 11.09.2009, 01:50
Re: [PROBLEM COMPILING] - Filterscript - by [HiC]TheKiller - 11.09.2009, 02:08
Re: [PROBLEM COMPILING] - Filterscript - by ilikepie2221 - 11.09.2009, 02:09
Re: [PROBLEM COMPILING] - Filterscript - by clavador - 11.09.2009, 02:18
Re: [PROBLEM COMPILING] - Filterscript - by HuRRiCaNe - 11.09.2009, 02:25
Re: [PROBLEM COMPILING] - Filterscript - by clavador - 11.09.2009, 02:29
Re: [PROBLEM COMPILING] - Filterscript - by _Vortex - 11.09.2009, 03:20
Re: [PROBLEM COMPILING] - Filterscript - by Zeex - 11.09.2009, 05:10
Re: [PROBLEM COMPILING] - Filterscript - by clavador - 11.09.2009, 17:07

Forum Jump:


Users browsing this thread: 1 Guest(s)