SA-MP Forums Archive
Scripting Problem - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Scripting Problem (/showthread.php?tid=154281)



Scripting Problem - Drowzz - 13.06.2010

Hey guys,

I have a problem.

This is the error :
Код:
D:\American_Idiot\gamemodes\American_idiot.pwn(1212) : warning 219: local variable "string" shadows a variable at a preceding level
D:\American_Idiot\gamemodes\American_idiot.pwn(1213) : warning 219: local variable "cmd" shadows a variable at a preceding level
D:\American_Idiot\gamemodes\American_idiot.pwn(1214) : warning 219: local variable "tmp" shadows a variable at a preceding level
D:\American_Idiot\gamemodes\American_idiot.pwn(1215) : warning 219: local variable "idx" shadows a variable at a preceding level
D:\American_Idiot\gamemodes\American_idiot.pwn(1800) : warning 219: local variable "string" shadows a variable at a preceding level
D:\American_Idiot\gamemodes\American_idiot.pwn(1871) : warning 219: local variable "string" shadows a variable at a preceding level
Код:
1212 till 1220 :

(playerid, cmdtext[])
{
  new string[128];
	new cmd[32];
	new tmp[32];
	new idx;
	cmd = strtok(cmdtext, idx);

Line 1800 : {
Line 1871 : LOw Nothing



Re: Scripting Problem - NiiRV4N4 - 13.06.2010

It's already being used. new string[256]; has already been used somewhere in the callback. so has the rest of the stuff it says it's over shadowing.