SA-MP Forums Archive
Problem - 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: Problem (/showthread.php?tid=433061)



Problem - DAVIDXP - 25.04.2013

Hey SA-MP, when i want to compile my GM, i get error at the definition of the line,i had try two metods, but it doesn't work:
pawn Код:
new C_DATA[MAX_PLAYERS];
And:
pawn Код:
new C_DATA[MAX_HOUSES];
And i get this error:
pawn Код:
error 009: invalid array size (negative, zero or out of bounds)
And this is the linie:
pawn Код:
DestroyVehicle( C_DATA[ i ][ HouseCar ] );
How i must define?
Help me ||>


Re: Problem - Frede - 25.04.2013

WHat s MAX_HOUSES defined as?


Re: Problem - DAVIDXP - 25.04.2013

Defined:
pawn Код:
#define MAX_HOUSES



Re: Problem - Pottus - 25.04.2013

DestroyVehicle( C_DATA[ i ][ HouseCar ] ); tells me C_DATA has a enumerator and is defined incorrectly. You should have something like this.

pawn Код:
#undef MAX_PLAYERS
#define MAX_PLAYERS 200

enum C_ENUM {
   HouseCar,
   Kills,
   Deaths
}

new C_DATA[MAX_PLAYERS][C_ENUM];



Re: Problem - DAVIDXP - 25.04.2013

Thnkyou a lot !!!!!!! /:* It WORKS )