Hi I have this
PHP Code:
new Password[4]
new szArg[192]
//.........
public RegisterPassword(id)
{
client_cmd(id, "messagemode Register_Pwd")
client_print(id, print_center, "Write Password Numbers")
set_hudmessage(255, 0, 0, 0.0, 0.0, 0, 0.1, 4.0, 0.01, 0.01, -1)
ShowSyncHudMsg(id, g_MsgSync, "^n^n^n Write Password Numbers")
return PLUGIN_CONTINUE;
}
public Pwd_register(id)
{
read_args( szArg, 191 )
remove_quotes( szArg )
trim ( szArg )
if( !isdigit(szArg[0]) )
{
RegisterPassword(id)
return PLUGIN_HANDLED;
}
copy( Password[id], charsmax( Password[] ), szArg )
client_print( id, print_chat, "Tu password es: %s", Password[id] )
CheckValidPassword(id)
return PLUGIN_CONTINUE;
}
public CheckValidPassword(id)
{
client_print(id, print_chat, "[DEBUG]public CheckValidPassword")
if((Password[0]*Password[3])-(Password[1]*Password[2]) == 1)
{
client_print(id, print_chat, "[DEBUG]Password Acepted")
InverseArray(id)
}
else
{
client_print(id, print_chat, "[DEBUG]Array Determinant Not 1")
RegisterPassword(id)
}
}
When the player write 4 numbers for the array Password, i want to check if the determinat of the array is 1 but when i put my four numbers, the plugin say that the determinat of the array is not 1. Why?
__________________