Help warning on string2 -
lonako45 - 09.05.2012
this is the line
PHP код:
stock SendHelpersMessage(color,const string2[])
Why have warning ??
PHP код:
: warning 219: local variable "string2" shadows a variable at a preceding level
Re: Help warning on string2 -
Vince - 09.05.2012
Because that variable is defined at a higher level. The warning is pretty clear. You have something like;
pawn Код:
new string2[128];
// later
stock SendHelpersMessage(color,const string2[])
Re: Help warning on string2 -
lonako45 - 09.05.2012
I try this ..
I try 50 60 70 10
all !
and warning ..
Re: Help warning on string2 -
lonako45 - 09.05.2012
HELP please?
Re: Help warning on string2 -
DarrenRhoads - 09.05.2012
Go onto your script and press ctrl+F. Then type "String2". You will find something similar to:
DELETE IT and try again.
Vince made it quiet clear as well as the warning itself!
Re: Help warning on string2 -
lonako45 - 09.05.2012
WHAT !?
I delete new string2[180];
and now :
undefined symbol "string2"
Re: Help warning on string2 -
DarrenRhoads - 09.05.2012
Okay..
1) just put back the "new string2" which you deleted..
2) change the name of "string2" on:
pawn Код:
stock SendHelpersMessage(color,const string2[])
maybe change it to?
pawn Код:
stock SendHelpersMessage(color,const string234[])
3) Change all the "string2" names in the stock to "string234" (or w/e you put as the variable name)
Re: Help warning on string2 -
lonako45 - 09.05.2012
Warning ..
WHy?!?!?
Re: Help warning on string2 -
aco_SRBIJA - 09.05.2012
Well, u can't add global variables into functions headers. Dont do anything, just do this
pawn Код:
stock SendHelpersMessage(color,string[])
{
//..make what should it do
}
Re: Help warning on string2 -
[ABK]Antonio - 09.05.2012
Quote:
Originally Posted by lonako45
WHAT !?
I delete new string2[180];
and now :
undefined symbol "string2"
|
Delete string2, get the line of that undefined symbol...ctrl+g enter the line number, above it somewhere inside the same function, add new string2[180]. Then go back to where you're doing your message thing and add the new string.
So, delete the global variable
add it locally on the functions that need it.