other help?
#1

look here:
Код:
format(string, sizeof(string), "VIP!--->>%s<<---says: %s", name, params[0] );
return SendClientMessageToAll(0xFF9900AA,string);
But when i type Just 4 letters appear how to fix that?
Reply
#2

change the string value : new string[100];
Reply
#3

D:\Folder\Folder\filterscript\vipsystem.pwn(759) : warning 219: local variable "string" shadows a variable at a preceding level
D:\Folder\Folder\filterscript\vipsystem.pwn(757) : warning 204: symbol is assigned a value that is never used: "string"
D:\Folder\Folder\filterscript\vipsystem.pwn(773) : warning 219: local variable "string" shadows a variable at a preceding level
D:\Folder\Folder\filterscript\vipsystem.pwn(770) : warning 204: symbol is assigned a value that is never used: "string"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


6 Warnings.[/QUOTE]
Reply
#4

Quote:
Originally Posted by Kells
Посмотреть сообщение
D:\Folder\Folder\filterscript\vipsystem.pwn(759) : warning 219: local variable "string" shadows a variable at a preceding level
D:\Folder\Folder\filterscript\vipsystem.pwn(757) : warning 204: symbol is assigned a value that is never used: "string"
D:\Folder\Folder\filterscript\vipsystem.pwn(773) : warning 219: local variable "string" shadows a variable at a preceding level
D:\Folder\Folder\filterscript\vipsystem.pwn(770) : warning 204: symbol is assigned a value that is never used: "string"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


6 Warnings.
[/QUOTE]
Show us the lines
Reply
#5

Line 757 :
Код:
new string[100];
Line 759 :
Код:
new name[MAX_PLAYER_NAME+1], string[24+MAX_PLAYER_NAME+1];
Line 770 :
Код:
new string[100];
Line 773 :
Код:
new name[MAX_PLAYER_NAME+1], string[24+MAX_PLAYER_NAME+1];
I used the
Код:
new string[100];
on 2 Commands Thats why its same Warnings i think
Reply
#6

help? how to remove these warnings?
Reply
#7

Replace on Line: 759 + 773
pawn Код:
new pName[MAX_PLAYER_NAME]; & new string[256];
Replace on Line: 770 + 757
pawn Код:
new str[128]
+REP me if i helped you
Reply
#8

You have a global variable somewhere on top of your script that says:
Код:
new string[]; //With a number in between the array of course.
Which means you either remove this from your current line:
Код:
new string[]; //Again, it would have a number in between the array.
Or rename it to something else, for example:
Код:
new str[]; //Again, with a number (I recommend str[128]; depending on the size of your format)
Can you show me the whole command/function in which you get the warnings, so I can optimize my solution?
Reply
#9

Delete the new string that are on lines 757 and on line 770
Reply
#10

i used "Spartaaaaa" idea but it didn't work
much errors and other
here for example
Код:
CMD:s(playerid, params[])
{
if(PlayerInfo[playerid][pVIP] >= 1){
new name[MAX_PLAYER_NAME+1], string[24+MAX_PLAYER_NAME+1];
GetPlayerName(playerid, name, sizeof(name));
if(isnull(params)) return SendClientMessage(playerid, LIGHTBLUE, "Usage: /s [Message]");
format(string, sizeof(string), "Cod Members Chat: {00FF00}%s{FF5500}: %s", name, params[0] );
return SendVipMessage(COLOR_VIP,string);
} else return SendClientMessage(playerid, RED,"[ERROR]: You need to beVip  to use this command!");
}
for example i type /s HELLO EVERYBODY
but it only show the letther 'hello' or less
and i don't have an 'new str' on top
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)