I Need Help
#5

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
Reply


Messages In This Thread
I Need Help - by Cody_Maverak - 12.11.2011, 00:05
Re: I Need Help - by Chrillzen - 12.11.2011, 00:11
Re: I Need Help - by Cody_Maverak - 12.11.2011, 01:29
Re: I Need Help - by Rachael - 12.11.2011, 02:29
Re: I Need Help - by Michael[NBK] - 12.11.2011, 02:44
Re: I Need Help - by Rachael - 12.11.2011, 02:54
Re: I Need Help - by Cody_Maverak - 12.11.2011, 14:34

Forum Jump:


Users browsing this thread: 1 Guest(s)