warning while compile - 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)
+--- Thread: warning while compile (
/showthread.php?tid=612662)
warning while compile -
Dejan12345 - 20.07.2016
Код:
{
// Get the name of the player that connected and display a join message to other players
new name[MAX_PLAYER_NAME], string[24+MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s has joined the server.", name);
SendClientMessageToAll(0xC4C4C4FF, string);
return 1;
}
Код:
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\pawno\BSRP.pwn(142) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\PC\Desktop\Dejanovi folderi\Black Shadow Roleplay\pawno\BSRP.pwn(148) : warning 225: unreachable code
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Warnings.
HELP
Re: warning while compile -
F1N4L - 20.07.2016
219 - Variable string is global or you have two variables with same name.
225 - You exceeded the returns
Re: warning while compile -
Dejan12345 - 20.07.2016
bro i use for playerconnect and playerread name when join new string 60 how to change it
Re: warning while compile -
UltraScripter - 20.07.2016
Same as the guy above said you using another var with the same name try to change from string to string2 or other than string
Re: warning while compile -
Dejan12345 - 20.07.2016
bro i try but dont work
Re: warning while compile -
UltraScripter - 20.07.2016
Did you add on top:
?
Re: warning while compile -
Dejan12345 - 20.07.2016
no but i delete it