invalid array size (negative, zero or out of bounds)
#1

I'm having another problem over here. I tried some ways to fix this but none of them worked.

This is the error:
pawn Код:
invalid array size (negative, zero or out of bounds)
This is the line where error occurs:
pawn Код:
new WeaponInfo[MAX_WEAPONS][wInfo];
Any help would be great.
Reply
#2

Is MAX_WEAPONS defined? I'm not certain it's defined by default.
Reply
#3

Quote:
Originally Posted by Aerotactics
Посмотреть сообщение
Is MAX_WEAPONS defined? I'm not certain it's defined by default.
Yes, it is defined.

pawn Код:
#define MAX_WEAPONS 2000
Reply
#4

Show your wInfo array please.
Reply
#5

pawn Код:
enum wInfo
{
        wObject,
        wWeaponID,
        Float:wWeaponX,
        Float:wWeaponY,
        Float:wWeaponZ,
        Float:wWeaponRot,
        wWeaponInt,
        wWeaponVW,
        wWeaponFaction,
};
Reply
#6

Make MAX_WEAPONS = 200, to see if 2000 is out of bounds.
Reply
#7

Quote:
Originally Posted by Aerotactics
Посмотреть сообщение
Make MAX_WEAPONS = 200, to see if 2000 is out of bounds.
No luck. Same error.
Reply
#8



wWeaponFaction,

remove the comma lol
Reply
#9

pawn Код:
error 017: undefined symbol "wInfo"
error 009: invalid array size (negative, zero or out of bounds)
Still error in this line:
pawn Код:
new WeaponInfo[MAX_WEAPONS][wInfo];
Reply
#10

I can't tell the issue right away then. Sorry.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)