I've got 2 Warnings.
#1

PHP код:
C:\Documents and Settings\gidon\щемзп дтбегд\VortexRoleplay.pwn(10105) : warning 219local variable "Faction" shadows a variable at a preceding level
C
:\Documents and Settings\gidon\щемзп дтбегд\VortexRoleplay.pwn(10111) : warning 213tag mismatch 
The command itself :

Код:
public LiteralFactionMessage(Faction, colour, string[])
{
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnectedEx(i))
	   	{
	   		if(Player[i][Faction] == Faction)
	   		{
	   		    SendClientMessage(i, colour, string);
	   		}
		}
	}
	return 1;
}
Warning lines :

Line 10105:
Warning :
PHP код:
C:\Documents and Settings\gidon\щемзп дтбегд\VortexRoleplay.pwn(10105) : warning 219local variable "Faction" shadows a variable at a preceding level 
Line:
Код:
public LiteralFactionMessage(Faction, colour, string[])
Line 10111:
Warning:
PHP код:
C:\Documents and Settings\gidon\щемзп дтбегд\VortexRoleplay.pwn(10111) : warning 213tag mismatch 
Line :
Код:
	   		if(Player[i][Faction] == Faction)
Reply
#2

You have defined "Factions" variable twice or more ( global and local ). It can be in includes.
You can rename "Factions" to something else..
Reply
#3

If I will ignore this warning, it might lead to serious bugs?
Reply
#4

Ignoring warnings usually don't lead to any bugs, but not a good habit to keep...
If it's within your power to stop a warning, should always do so

But no serious bug will come from it

Edit: Also, a tag mismatch means you either have too little or too many arguments, check the line it says it on...
(In your case, check the Player Function for the correct usage)
Oh this is a warning, this warning will lead to serious bugs, but not the first one, sorry...
Reply
#5

Why dont just rename it something like "factionid"
Reply
#6

Alright, fixed it up, thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)