Possibly unintended argument
#1

warning 211: possibly unintended assignment

Line: if (plname = "Sole")

Easy way to fix this?

Thanks,
~Andrew
Reply
#2

pawn Код:
if (plname == "Sole")
Reply
#3

Use strcmp.
Reply
#4

It's in OnPlayerConnect and making it == gives the error error 033: array must be indexed (variable "plname")
Reply
#5

As i said, use strcmp, because it's the function for string comparison
Reply
#6

Quote:
Originally Posted by [LARP
Aimless ]
It's in OnPlayerConnect and making it == gives the error error 033: array must be indexed (variable "plname")
apologies , you need strcmp as 0rb rightly suggested.
Reply
#7

pawn Код:
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
if(!strcmp(name,"Sole",true))
{
  // your function
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)