Array Issue
#1

Hi guys,
I'm having an issue with the following array:
pawn Code:
new PlayerIn[5][3];
if I use this I get tons of warnings (as if a bracket } was missing)
Code:
(6571) : warning 219: local variable "string" shadows a variable at a preceding level
(6602) : warning 219: local variable "string" shadows a variable at a preceding level
(6616) : error 021: symbol already defined: "string"
(6751) : warning 219: local variable "string" shadows a variable at a preceding level
(6864) : warning 219: local variable "string" shadows a variable at a preceding level
(6894) : warning 219: local variable "string" shadows a variable at a preceding level
(6908) : warning 219: local variable "string" shadows a variable at a preceding level
(7054) : warning 219: local variable "string" shadows a variable at a preceding level
(7079) : warning 219: local variable "string" shadows a variable at a preceding level
(7239) : warning 219: local variable "string" shadows a variable at a preceding level
(7257) : warning 219: local variable "string" shadows a variable at a preceding level
(7275) : warning 219: local variable "string" shadows a variable at a preceding level
(7293) : warning 219: local variable "string" shadows a variable at a preceding level
(7311) : warning 219: local variable "string" shadows a variable at a preceding level
7341) : warning 219: local variable "string" shadows a variable at a preceding level
(7452) : warning 219: local variable "string" shadows a variable at a preceding level
(7476) : warning 219: local variable "string" shadows a variable at a preceding level


1 Error.
all these lines are referring to a completely other part of the script...
I've searched for missing brackets, but there are none. If I comment the line I've posted out, it works fine (except of the errors for that variable not to be defined obv.)

what have I done wrong with that array?


PS: the line above and below:
pawn Code:
new counts = 0;
new PlayerIn[5][3];
new tmp[400];
Reply
#2

I think it should be
pawn Code:
new PlayerIn[5][3][];
but don't take me as granted. I didn't touch pawn for long time.
Reply
#3

Have you declared a global variable "string" ?
Reply
#4

Quote:
Originally Posted by Dutheil
View Post
Have you declared a global variable "string" ?
Nope... As I mentioned, it works fine without that array, if I had a global string it would occur without that variable, too...


@arad: why would it? I thought it to be a 2 dimensional array... A list that stores 5 items with 3 specifications... an additional [] would be necessary if I was storing strings in it only, but I'm saving integers, or am I wrong with this?
Reply
#5

You know that this variable
pawn Code:
PlayerIn[5][3];
has no problem, so post more code.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)