please help me with this..............
#1

hi there, i just want to show u guyz a cmd ( PM cmd) and i've a A timer announcer like : [SERVER] don't ask to be admin ingame, go to our forums then the forum site, thats not the problem the problem is thats i got 1 warning :
Quote:

warning 219: local variable "Message" shadows a variable at a preceding level

and the GM is HERE
but why i get that warning , maybe cuz i have the ( Message ) word in 2 things in my script , idk but
PLEASE HELP ME GUYS
Reply
#2

please help. !@!!!!! -.-'
Reply
#3

don't double post. < you can only do that after 12 hours.
Reply
#4

help me then say ur oponion , u didn't help me so don't say ur oponion
Reply
#5

in line 653 you are creating a string
Код:
new Message[256];
despite its already created upwards in the script, holding an array of your "commercial messages", this causes the warning. this Message[][] is used aswell in line 687-692. replace "Message" in line 653 by "MessageHint":
Код:
new MessageHint[256];
if youre done, you should also replace line 687-692 with
Код:
format(MessageHint,sizeof(MessageHint),"Sent %s(%d): %s",iName,id,gMessage);
SendClientMessage(playerid,PM_OUTGOING_COLOR,MessageHint);
format(MessageHint,sizeof(MessageHint),"Resived %s(%d): %s",pName,playerid,gMessage);
SendClientMessage(id,PM_INCOMING_COLOR,MessageHint);

printf("PM: %s",MessageHint);
i hope it works.
edit: i typed 642 instead of 653. damned typos all the time lol
Reply
#6

Quote:
Originally Posted by Babul
Посмотреть сообщение
in line 653 you are creating a string
Код:
new Message[256];
despite its already created upwards in the script, holding an array of your "commercial messages", this causes the warning. this Message[][] is used aswell in line 687-692. replace "Message" in line 642 by "MessageHint":
Код:
new MessageHint[256];
if youre done, you should also replace line 687-692 with
Код:
format(MessageHint,sizeof(MessageHint),"Sent %s(%d): %s",iName,id,gMessage);
SendClientMessage(playerid,PM_OUTGOING_COLOR,MessageHint);
format(MessageHint,sizeof(MessageHint),"Resived %s(%d): %s",pName,playerid,gMessage);
SendClientMessage(id,PM_INCOMING_COLOR,MessageHint);

printf("PM: %s",MessageHint);
i hope it works.
mate you gave us 6 ms to reply before you double posted by still this is correct ive tryed it for you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)