Quote:
Originally Posted by Rachael
Here is the problem
pawn Код:
if (Password[] == actualPassword[])
The only time you use [] is if/when the variable is a string function parameter, or being defined as an array like this ( for example )
pawn Код:
stock YourFunction( playerid , inputtext[] )
//or
new brown[] = { 34 , 45 , 0 , 6 };
You are trying to compare the password with the players input, so you could use strcmp
pawn Код:
if( !strcmp( params , actualpassword , true ) )
another issue involving the command processor. Empty param strings will not trigger strlen, so the author has included a function to detect a lack of input from the player
pawn Код:
if( !strlen(params) )
//should be
if( isnull(params) )
Also, another small issue, you have an input string 256 long, the maximum number of characters in the chatbox is around 128.
anyway good luck.
|
Is isnull already defined? Or how to define it?
Thanks in advance