Warning xD
#1

Код:
if(strcmp(cmd, "/help", true) == 0)
	{
        new string[768];
    	new message[] = "BLALA ;
		new message2[] = \NLABLA"\n 
		format(string, sizeof(string),"%s %s",message,message2);
		ShowPlayerDialog(playerid, 1244, DIALOG_STYLE_MSGBOX,"",string,"Okay","");
		return 1;
}
Warning

Код:
C:\Users\Bhupesh\Desktop\my new\Gamemodes\lvdm.pwn(928) : warning 219: local variable "string" shadows a variable at a preceding level
How to fix it
Reply
#2

You have two strings defined or how to call it. search for string
Reply
#3

Quote:
Originally Posted by AlexzzPro
Посмотреть сообщение
You have two strings defined or how to call it. search for string
Depends on what you mean, if it "shadows a variable" you probaly have already a string in an Enum.

Try renaming string in the enum to _string to avoid these problems.



Edit: WHY are you using two strings (one with undefined size) and one with the redicilous size of 765.
One string of 128 should be enough, also you cannot use new 'message[128] = "test";'
this should be:
pawn Код:
new message[128];
format(message,sizeof message,"blabla");
Reply
#4

Код:
	new string[256];
shit its defined on command text and it 2 whihc should i use
Reply
#5

WOW your string is way too big
Reply
#6

fixed thanks
Reply
#7

ok sister, remove new string[765];
Reply
#8

Yea, If you got in OnPlayerCommandText. You dont need to define it again.

And its way to big
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)