I got one error when making my filterscript
#1

I got this error when making the filterscript .

PHP код:
C:\Documents and Settings\Privat\Desktop\Ban.pwn(29) : error 029invalid expressionassumed zero 
and here line is :

pawn Код:
if(GetPlayerName(playerid) == lol))
Reply
#2

GetPlayerName(playerid) // return string you cannot compare string like this
u must use
Quote:

strcmp(GetPlayerName(playerid), lol, true)

Reply
#3

Azazelo what are you doing ?

pawn Код:
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));

if(!strcmp(pName, "lol", true))
{
       // your code
}
Reply
#4

idk what azzelo gave me , but it didn't help me for anything ..
Reply
#5

Use my code.

pawn Код:
new pName[MAX_PLAYER_NAME]; // Creating a new variable to saving players name.
GetPlayerName(playerid, pName, sizeof(pName)); // GetPlayerName saves the players name of the player 'playerid' in this pName variable

if(!strcmp(pName, "lol", true)) // checking is the name of players lol or not.  true means ingorecase so, lOl isn't same as lol when you set it to false LOl is the same as lol
{
       // name is right. Do anything here
}
Reply
#6

Fixed . Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)