other help? -
Kells - 19.05.2014
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?
Re : other help? -
yusei - 19.05.2014
change the string value : new string[100];
Re: other help? -
Kells - 19.05.2014
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]
Re: other help? -
JFF - 19.05.2014
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
Re: other help? -
Kells - 19.05.2014
Line 757 :
Line 759 :
Код:
new name[MAX_PLAYER_NAME+1], string[24+MAX_PLAYER_NAME+1];
Line 770 :
Line 773 :
Код:
new name[MAX_PLAYER_NAME+1], string[24+MAX_PLAYER_NAME+1];
I used the
on 2 Commands Thats why its same Warnings i think
Re: HELP me! Please i will +rep -
Kells - 19.05.2014
help? how to remove these warnings?
Re: other help? -
Spartaaaaa - 19.05.2014
Replace on Line: 759 + 773
pawn Код:
new pName[MAX_PLAYER_NAME]; & new string[256];
Replace on Line: 770 + 757
+REP me if i helped you
Re: other help? -
AndySedeyn - 19.05.2014
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?
Re: other help? -
JFF - 20.05.2014
Delete the new string that are on lines 757 and on line 770
Re: other help? -
Kells - 20.05.2014
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