06.07.2013, 19:34
From what I see, your password should be a string and not a number.
Switch to:
Switch to:
pawn Код:
forward OnPlayerLogin(playerid, password[]);
public OnPlayerLogin(playerid, password[])
pawn Код:
new tmppass[64];
// assign the password
OnPlayerLogin(playerid,tmppass);// It won't give arror anymore, since you parse a string in it.
pawn Код:
public OnPlayerLogin(playerid, password[])
{
new string2[256], keystring[256];
format(string2, sizeof(string2), "%s.ini", PlayerName(playerid));
keystring = dini_Get(string2, "Key");
if(strcmp(keystring, password, true) == 0) // I assume that's the password check string1 is equal to string2
{
pawn Код:
new tmp[64];
strmid(tmp, inputtext, 0, strlen(inputtext), 255);
OnPlayerLogin(playerid,tmp);// Insert a string will prevent the error