21.03.2010, 10:00
guys what is wrong here ?
and this errorS
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
new file[256];
new tmp[256];
new tmp2[256];
if(dialogid == 1) // Register Dialog
{
format(file,sizeof(file),"/KA/Users/%s.sav",udb_encode(name));
if(!fexist(file))
{
dini_Create(file);
dini_IntSet(file, "Password", udb_hash(tmp));
dini_IntSet(file,"AdminLevel", 0);
dini_IntSet(file,"Cash", 500);
dini_IntSet(file,"Registered", 1);
SendClientMessage(playerid, COLOR_GREEN, "[System]: Account Created!");
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
GetPlayerName(playerid, name, sizeof(name));
printf("%s has registered a account!", name);
}
else
{
SendClientMessage(playerid, COLOR_GREEN, " Account Already Found In Database");
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
return 1;
}
}
if(dialogid == 2) // Login Dialog
{
if(IsLogged[playerid] == 1)
{
SendClientMessage(playerid, COLOR_GREEN, "You already are logged in!");
return 1;
}
else
{
format(file,sizeof(file),"/KA/Users/%s.sav",udb_encode(name(playerid)) ); --------------------------------> Error line
if(fexist(file))
{
tmp2 = dini_Get(file, "Password");
if(udb_hash(tmp) != strval(tmp2))
{
SendClientMessage(playerid, COLOR_GREEN, "Login Failed!");
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
printf("%s has failed to login", name);
}
else
{
IsLogged[playerid] = 1;
SetPlayerMoney(playerid, dini_Int(file, "Cash"));
PlayerInfo[playerid][AdminLevel] = dini_Int(file, "AdminLevel");
PlayerInfo[playerid][Registered] = dini_Int(file, "Registered");
SendClientMessage(playerid, COLOR_GREEN, "[System]: Account Logged into!");
}
return 1;
}
}
}
return 1;
}
Код:
C:\Documents and Settings\samp\Desktop\Server 2\gamemodes\new.pwn(377) : error 012: invalid function call, not a valid address C:\Documents and Settings\samp\Desktop\Server 2\gamemodes\new.pwn(377) : warning 215: expression has no effect C:\Documents and Settings\samp\Desktop\Server 2\gamemodes\new.pwn(377) : error 001: expected token: ";", but found ")" C:\Documents and Settings\samp\Desktop\Server 2\gamemodes\new.pwn(377) : error 029: invalid expression, assumed zero C:\Documents and Settings\samp\Desktop\Server 2\gamemodes\new.pwn(377) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.


what was wrong i mean about those function or array?