Help with dialog please
#1

I was making an Dialog login and registration system but i got a error.See
Код:
C:\Users\PART\Desktop\Desktop\samp03csvr_R2-2_win32\filterscripts\test.pwn(112) : error 036: empty statement
C:\Users\PART\Desktop\Desktop\samp03csvr_R2-2_win32\filterscripts\test.pwn(116) : error 017: undefined symbol "dini_Inset"
the lines are
Код:
public OnPlayerDisconnect(playerid, reason)
{
	new name[MAX_PLAYER_NAME], file[256];
	GetPlayerName(playerid, name, sizeof(name));
	format(file, sizeof(file), SERVER_USER_FILE, name);
	if(gPlayerLogged[playerid] == 1);
	{
	    dini_IntSet(file, "Score",  PInfo[playerid][pScore]);
	    dini_IntSet(file, "Money", PInfo[playerid][pMoney]);
	    dini_Inset(file, "AdminLevel", PInfo[playerid][pAdminLevel]);
	}
	gPlayerLogged[playerid] = 0;
	
	return 1;
}
Reply
#2

Care to look at the lines where you have the errors?
Reply
#3

i am not understanding what to do and the lines are:

112
Quote:

if(gPlayerLogged[playerid] == 1);

and line number 116 is
Quote:

dini_IntSet(file, "Score", PInfo[playerid][pScore]);

Reply
#4

pawn Код:
if(gPlayerLogged[playerid] == 1);
Remove the ';'
Reply
#5

Change 'dini_Inset' to 'dini_IntSet'
Reply
#6

I got some new errors
Quote:

C:\Users\PART\Desktop\Desktop\samp03csvr_R2-2_win32\filterscripts\test.pwn(293) : error 001: expected token: ";", but found "-identifier-"
C:\Users\PART\Desktop\Desktop\samp03csvr_R2-2_win32\filterscripts\test.pwn(293) : warning 202: number of arguments does not match definition
C:\Users\PART\Desktop\Desktop\samp03csvr_R2-2_win32\filterscripts\test.pwn(294) : warning 202: number of arguments does not match definition
C:\Users\PART\Desktop\Desktop\samp03csvr_R2-2_win32\filterscripts\test.pwn(295) : warning 202: number of arguments does not match definition
C:\Users\PART\Desktop\Desktop\samp03csvr_R2-2_win32\filterscripts\test.pwn(296) : warning 202: number of arguments does not match definition
C:\Users\PART\Desktop\Desktop\samp03csvr_R2-2_win32\filterscripts\test.pwn(301) : warning 217: loose indentation
C:\Users\PART\Desktop\Desktop\samp03csvr_R2-2_win32\filterscripts\test.pwn(310) : error 001: expected token: ")", but found "!"
C:\Users\PART\Desktop\Desktop\samp03csvr_R2-2_win32\filterscripts\test.pwn(310) : error 029: invalid expression, assumed zero
C:\Users\PART\Desktop\Desktop\samp03csvr_R2-2_win32\filterscripts\test.pwn(310) : warning 215: expression has no effect
C:\Users\PART\Desktop\Desktop\samp03csvr_R2-2_win32\filterscripts\test.pwn(310) : error 001: expected token: ";", but found ")"
C:\Users\PART\Desktop\Desktop\samp03csvr_R2-2_win32\filterscripts\test.pwn(310) : fatal error 107: too many error messages on one line

the lines are
293
Quote:

dini_Int(file, "Password", udb_hash(inputtext));

294, 295, 296
Quote:

dini_Int(file, "Score", PInfo[playerid][pScore]);
dini_Int(file, "Money", PInfo[playerid][pMoney]);
dini_Int(file, "AdminLevel", PInfo[playerid][pAdminLevel]);

301
Quote:

if(dialogid == 2)

310
Quote:

if(udb_hash(inputtext) ! = tmp);

Reply
#7

Show more code.
Reply
#8

Errors are from line 293 to 310.
The error in line 293 seems to be a missing ; in the line above, but to be sure, we need the code !
Show lines 285 to 320.
Reply
#9

Quote:
Originally Posted by Drebin
Посмотреть сообщение
Errors are from line 293 to 310.
The error in line 293 seems to be a missing ; in the line above, but to be sure, we need the code !
Show lines 285 to 320.
Код:
if(dialogid == 1)
	{
	    new name[MAX_PLAYER_NAME], file[256], string[128];
	    GetPlayerName(playerid, name, sizeof(name));
	    format(file, sizeof(file), SERVER_USER_FILE, name);
	    if(!response) return Kick(playerid);
	    if(!strlen(inputtext)) return 	ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Hi you are not registered","You need to registered,Input your PW","Register","Kick Me");
	    dini_Create(file)
	    dini_Int(file, "Password", udb_hash(inputtext));
	    dini_Int(file, "Score", PInfo[playerid][pScore]);
	    dini_Int(file, "Money", PInfo[playerid][pMoney]);
	    dini_Int(file, "AdminLevel", PInfo[playerid][pAdminLevel]);
	    format (string, 128, "SYSTEM: You have succefully logged in with %s nickname and %s pass","Enjoy Playing", name, inputtext);
	    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
	    gPlayerLogged[playerid] = 1;
	 }
	 if(dialogid == 2)
	 {
	    new name[MAX_PLAYER_NAME], file[256], string[128];
	    GetPlayerName(playerid, name, sizeof(name));
	    format(file, sizeof(file), SERVER_USER_FILE, name);
	    if(!response) return Kick(playerid);
	    if(!strlen(inputtext)) return ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Hi you are registered","Cool dude now just in put your PW below","Login","Kick Me");
	    new tmp;
	    tmp = dini_Int(file, "Password");
	    if(udb_hash(inputtext) ! = tmp);
Reply
#10

293-296: change dini_Int to dini_IntSet

310:
pawn Код:
if(udb_hash(inputtext) != tmp)
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)