Array Issue - 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: Array Issue (
/showthread.php?tid=563801)
Array Issue -
Sascha - 17.02.2015
Hi guys,
I'm having an issue with the following array:
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];
Re: Array Issue -
arad55 - 17.02.2015
I think it should be
but don't take me as granted. I didn't touch pawn for long time.
Re : Array Issue -
Dutheil - 17.02.2015
Have you declared a global variable "string" ?
Re: Re : Array Issue -
Sascha - 17.02.2015
Quote:
Originally Posted by Dutheil
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?
Re: Array Issue -
ATGOggy - 17.02.2015
You know that this variable
has no problem, so post more code.