sscanf2 Warning 219
#1

So I Have Been Trying to Make A "givemoney" command in zcmd and sscanf2 and I Keep getting this error

Код:
C:\Users\Bremt\Desktop\Games\Scripting\pawno\include\sscanf2.inc(199) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\Brent\Desktop\Games\Scripting\pawno\include\sscanf2.inc(305) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Brent\Desktop\Games\Scripting\pawno\include\sscanf2.inc(305) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Brent\Desktop\Games\Scripting\pawno\include\sscanf2.inc(365) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Brent\Desktop\Games\Scripting\pawno\include\sscanf2.inc(365) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Brent\Desktop\Games\Scripting\gamemodes\KobeLearner.pwn(288) : warning 219: local variable "string" shadows a variable at a preceding level
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Warnings.
I Cant Seem To Find A Way To Solve This.

The Lines

( 199 )
Код:
	}
( There Is No 305 )
( There Is No 365 )
( 288 )
Код:
new forplayername[24], forplayerid, amount, string[128];
Any Help is Appreciated!
Reply
#2

"local variable "string" shadows a variable at a preceding level"

means that you already have a variable named like that somewhere in your script.
same goes for the "name" var.
you have to use different identifiers

Just choose another identifer for "string" and "name"
like "stringxy" and "namexy"
Reply
#3

Now It Does This
Код:
C:\Users\Brent\Desktop\Games\Scripting\gamemodes\KobeLearner.pwn(294) : error 017: undefined symbol "stringxyz"
C:\Users\Brent\Desktop\Games\Scripting\gamemodes\KobeLearner.pwn(294) : error 017: undefined symbol "stringxyz"
C:\Users\Brent\Desktop\Games\Scripting\gamemodes\KobeLearner.pwn(294) : error 029: invalid expression, assumed zero
C:\Users\Brent\Desktop\Games\Scripting\gamemodes\KobeLearner.pwn(294) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply
#4

Sorry For My Stupidity But How Would I Do That?
Reply
#5

Thank You!!!! I Get It Now
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)