Quick easy question. - 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: Quick easy question. (
/showthread.php?tid=300050)
Quick easy question. -
remyguys - 28.11.2011
How to fix this?
warning 219: local variable "string" shadows a variable at a preceding level
this is the line:
PHP код:
new name[MAX_PLAYERS], string[48];
Re: Quick easy question. -
moadi - 28.11.2011
You must not declare the same variable twice.(globally or in a callback)
Re: Quick easy question. -
remyguys - 28.11.2011
Quote:
Originally Posted by moadi
You must not declare the same variable twice.(globally or in a callback)
|
When i delete it , more errors.
Re: Quick easy question. -
moadi - 28.11.2011
Quote:
Originally Posted by remyguys
When i delete it , more errors.
|
Oh, you don't have to delete one.. just edit one of them.
Re: Quick easy question. -
remyguys - 28.11.2011
Quote:
Originally Posted by moadi
Oh, you don't have to delete one.. just edit one of them.
|
To what
Re: Quick easy question. -
moadi - 28.11.2011
Quote:
Originally Posted by remyguys
To what
|
If you have two variable with the same name, e.g
pawn Код:
new string[128];
new string[128];
edit one of them..
pawn Код:
new string[128];
new string1[128];