PDA

View Full Version : Error and Warning !


dorperez
13/11/2011, 05:54 AM
C:\GTA - San Andreas\Server\gamemodes\Rp11Back.pwn(1489) : error 008: must be a constant expression; assumed zero
C:\GTA - San Andreas\Server\gamemodes\Rp11Back.pwn(10781) : warning 219: local variable "i" shadows a variable at a preceding level
C:\GTA - San Andreas\Server\gamemodes\Rp11Back.pwn(10786) : warning 219: local variable "i" shadows a variable at a preceding level
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


1 Error.


Line 1489:

new LuX_ReadPlayerPosition[PLAYERS][ReadPositions];


Line 10781:

for (new i=0; i < p; i++) {

Line 10786:

for(new i; i<MAX_PLAYERS; i++)


Tnx !

TheLazySloth
13/11/2011, 06:00 AM
warning 219: local variable "i" shadows a variable at a preceding level
That error means you have two variables that are the same, in this case i

error 008: must be a constant expression; assumed zero
One of the arrays (probably PLAYERS) isn't defined.

Juniior
13/11/2011, 10:38 AM
You didn't close the first for loop type instruction.


main()
{
for(new i = 1; i > 0; i++)
{
print("debug");
}
for(new i = 1; i > 0; i++)
{
print("debug");
}

}

dorperez
13/11/2011, 11:56 AM
Tnx !