PLEASE HELP
#1

I THOUGHT FINALY MY REGISTER SYSTEM IS FINISH BUT NOW I TYPED MY PASSWORD WRONG IN THE DIALOG BUT IT JUST LOGGED ME IN AND THEN I SAW IN THE USERFILE AND I SAW PASSWORD = 1 WTF PLEASE HELP ME I GOT NO ERRORS BUT I RLY NEED HELP!!!!!
I TRYED EVERYTHING BUT IT BUGGES MORE AND MORE BUT I HAVE BACKUP AND I POST PASTEBIN LINK:
http://pastebin.com/FLEdcxYU
PLEASE HELP MEE!!!
Reply
#2

In OnDialogResponse replace tmp with inputtext.
Reply
#3

DOES NOT WORK !! (((

HELP PLEASE!!
Reply
#4

Quote:
Originally Posted by Lamano
DOES NOT WORK !! (((

HELP PLEASE!!
Are you sure you replaced ALL tmp's ?
Reply
#5

Quote:
Originally Posted by MadeMan
Quote:
Originally Posted by Lamano
DOES NOT WORK !! (((

HELP PLEASE!!
Are you sure you replaced ALL tmp's ?
I REPLACED ALL TMP'S IN ONPLAYERDIALOGRESPONSE.
AND I GOT THIS WARNING:
Quote:

C:\Documents and Settings\Eigenaar\Bureaublad\Minigames\filterscrip ts\Minigame.pwn(116) : warning 219: local variable "inputtext" shadows a variable at a preceding level
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Warning.

Reply
#6

FIRST QUIT THE CAPS LOL

BTW CHANGE "inputtext"
TO "inputtext2"
Reply
#7

i have this now!:

Quote:

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new string[256];
new inputtext[256],inputtext2[256];
GetPlayerName(playerid, playername, sizeof(playername));
switch(dialogid)
{
case 1:
{
if (dini_Exists(udb_encode(playername)))
{
inputtext2 = dini_Get(udb_encode(playername), "password");
if (udb_hash(inputtext) != strval(inputtext2))
{
SendClientMessage(playerid, COLOR_RED, "Wrong password");
}
else
{
logged[playerid] = 1;
money[playerid] = dini_Int(udb_encode(playername), "money");
score[playerid] = dini_Int(udb_encode(playername), "score");
registered[playerid] = dini_Int(udb_encode(playername), "registered");
adminlevel[playerid] = dini_Int(udb_encode(playername), "adminlevel");
format(string, sizeof(string), "%s, You are now logged in. Your adminlevel is %d, Your money is %d, and your score is %d.", playername, adminlevel[playerid], money[playerid], score[playerid]);
SendClientMessage(playerid, COLOR_GREEN, string);
GivePlayerMoney(playerid, money[playerid]);
SetPlayerScore(playerid, score[playerid]);
printf("%s has logged in",playername);
return 1;
}
}
else
{
format(string, sizeof(string), "The account %s does not exist yet. Type /register [password] to make an account.", playername);
SendClientMessage(playerid, COLOR_RED, string);
return 1;
}
}
case 2:
{
if (!dini_Exists(udb_encode(playername)))
{
dini_Create(udb_encode(playername));
dini_IntSet(udb_encode(playername), "password", udb_hash(inputtext));
dini_IntSet(udb_encode(playername), "adminlevel", 0);
dini_IntSet(udb_encode(playername), "money", 0);
dini_IntSet(udb_encode(playername), "score", 0);
dini_IntSet(udb_encode(playername), "registered", 0);
format(string, sizeof(string), "Account %s has been made!", playername, inputtext);
SendClientMessage(playerid, COLOR_GREEN, string);
printf("%s has registered",playername);
registered[playerid] = 1;
}
return 1;
}
}
return 0;
}

PLEASE HELP!!
Reply
#8

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    new string[128];
    new tmp2[128];
  GetPlayerName(playerid, playername, sizeof(playername));
  switch(dialogid)
  {
    case 1:
    {
     if (dini_Exists(udb_encode(playername)))
     {
      tmp2 = dini_Get(udb_encode(playername), "password");
      if (udb_hash(inputtext) != strval(tmp2))
      {
        SendClientMessage(playerid, COLOR_RED, "Wrong password");
      }
      else
      {
        logged[playerid] = 1;
        money[playerid] = dini_Int(udb_encode(playername), "money");
        score[playerid] = dini_Int(udb_encode(playername), "score");
        registered[playerid] = dini_Int(udb_encode(playername), "registerd");
        adminlevel[playerid] = dini_Int(udb_encode(playername), "adminlevel");
        format(string, sizeof(string), "%s, You are now logged in. Your adminlevel is %d, Your money is %d, and your score is %d.", playername, adminlevel[playerid], money[playerid], score[playerid]);
        SendClientMessage(playerid, COLOR_GREEN, string);
        GivePlayerMoney(playerid, money[playerid]);
        SetPlayerScore(playerid, score[playerid]);
        printf("%s has logged in",playername);
        return 1;
      }
     }
     else
     {
      format(string, sizeof(string), "The account %s does not exist yet. Type /register [password] to make an account.", playername);
      SendClientMessage(playerid, COLOR_RED, string);
      return 1;
     }
   }
   case 2:
   {
     if (!dini_Exists(udb_encode(playername)))
     {
         dini_Create(udb_encode(playername));
       dini_IntSet(udb_encode(playername), "password", udb_hash(inputtext));
       dini_IntSet(udb_encode(playername), "adminlevel", 0);
       dini_IntSet(udb_encode(playername), "money", 0);
       dini_IntSet(udb_encode(playername), "score", 0);
       dini_IntSet(udb_encode(playername), "registered", 0);
       format(string, sizeof(string), "Account %s has been made!", playername, inputtext);
       SendClientMessage(playerid, COLOR_GREEN, string);
       printf("%s has registered",playername);
       registered[playerid] = 1;
     }
     return 1;
   }
    }
    return 0;
}
Reply
#9

I GOT THIS ERROR:

Quote:

C:\Documents and Settings\Eigenaar\Bureaublad\Minigames\filterscrip ts\Minigame.pwn(124) : error 047: array sizes do not match, or destination array is too small
C:\Documents and Settings\Eigenaar\Bureaublad\Minigames\filterscrip ts\Minigame.pwn(169) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

PLEASE HELPP!!
Reply
#10

I HAVE NOW THIS BUT STILL NOT WORKING HELP1!!!!!:
Quote:

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new string[128];
new tmp2[128];
GetPlayerName(playerid, playername, sizeof(playername));
switch(dialogid)
{
case 1:
{
if (dini_Exists(udb_encode(playername)))
{
format(tmp2, sizeof(tmp2), dini_Get(udb_encode(playername), "password"));
if (!strcmp(inputtext, tmp2, true))
{
SendClientMessage(playerid, COLOR_RED, "Wrong password");
}
else
{
logged[playerid] = 1;
money[playerid] = dini_Int(udb_encode(playername), "money");
score[playerid] = dini_Int(udb_encode(playername), "score");
registered[playerid] = dini_Int(udb_encode(playername), "registerd");
adminlevel[playerid] = dini_Int(udb_encode(playername), "adminlevel");
format(string, sizeof(string), "%s, You are now logged in. Your adminlevel is %d, Your money is %d, and your score is %d.", playername, adminlevel[playerid], money[playerid], score[playerid]);
SendClientMessage(playerid, COLOR_GREEN, string);
GivePlayerMoney(playerid, money[playerid]);
SetPlayerScore(playerid, score[playerid]);
printf("%s has logged in",playername);
return 1;
}
}
else
{
format(string, sizeof(string), "The account %s does not exist yet. Type /register [password] to make an account.", playername);
SendClientMessage(playerid, COLOR_RED, string);
return 1;
}
}
case 2:
{
if (!dini_Exists(udb_encode(playername)))
{
dini_Create(udb_encode(playername));
dini_IntSet(udb_encode(playername), "password", udb_hash(inputtext));
dini_IntSet(udb_encode(playername), "adminlevel", 0);
dini_IntSet(udb_encode(playername), "money", 0);
dini_IntSet(udb_encode(playername), "score", 0);
dini_IntSet(udb_encode(playername), "registered", 0);
format(string, sizeof(string), "Account %s has been made!", playername, inputtext);
SendClientMessage(playerid, COLOR_GREEN, string);
printf("%s has registered",playername);
registered[playerid] = 1;
}
return 1;
}
}
return 0;
}

Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)