Register / Login Dialogs Bugs
#1

Hi Guys I Back

OK NOW !!

When i try to make my own Dialog of Register / Login its failed and i try many times to fix it but i can i don't know why

PHP код:
lvcnr.pwn(81) : error 017undefined symbol "pInfo"
lvcnr.pwn(81) : error 009invalid array size (negativezero or out of bounds)
lvcnr.pwn(349) : error 017undefined symbol "UserPath"
lvcnr.pwn(352) : error 010invalid function or declaration
lvcnr
.pwn(356) : error 010invalid function or declaration
lvcnr
.pwn(361) : error 017undefined symbol "pKills"
lvcnr.pwn(362) : error 017undefined symbol "pDeaths"
lvcnr.pwn(594) : error 017undefined symbol "UserPath"
lvcnr.pwn(595) : error 017undefined symbol "udb_hash"
lvcnr.pwn(614) : error 017undefined symbol "udb_hash"
lvcnr.pwn(616) : error 017undefined symbol "UserPath"
lvcnr.pwn(617) : error 017undefined symbol "pCash" 
I Make Folder Name " Users " In Scirptfile but i need to know Now how to Fix that bugs? I Give you the lines it

PHP код:
new PlayerInfo[MAX_PLAYERS][pInfo]; 
Line 81 + 82:
PHP код:
public OnPlayerConnect(playerid)
{
        
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra true, .extra playerid);
          
ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE"Type your password below to login.","Login","Quit");
    }
    else
    {
         
ShowPlayerDialog(playeridDIALOG_REGISTERDIALOG_STYLE_INPUT,""COL_WHITE"Registering...",""COL_WHITE"Type your password below to register a new account.","Register","Quit");
    } 
line 349 + 352 + 356

PHP код:
public OnPlayerDeath(playeridkilleridreason)
{
    
PlayerInfo[killerid][pKills]++;
    
PlayerInfo[playerid][pDeaths]++;
    return 
1;

Line 360 + 361

PHP код:
new INI:File INI_Open(UserPath(playerid)); 
line 594
PHP код:
INI_WriteInt(File,"Password",udb_hash(inputtext)); 
line 596
PHP код:
if(udb_hash(inputtext) == PlayerInfo[playerid][pPass]) 
line 614
PHP код:
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra true, .extra playerid); 
line 616
PHP код:
GivePlayerMoney(playeridPlayerInfo[playerid][pCash]); 
617
Reply
#2

Show me your " LoadUser_ ... " and the PlayerInfo enum
Reply
#3

Quote:
Originally Posted by oMa37
Посмотреть сообщение
Show me your " LoadUser_ ... " and the PlayerInfo enum
ok bro .

PHP код:
enum pInfo
{
    
pPass,
    
pCash,
    
pAdmin,
    
pKills,
    
pDeaths

this enum

PHP код:
forward LoadUser_data(playerid,name[],value[]);
public 
LoadUser_data(playerid,name[],value[])
{
    
INI_Int("Password",PlayerInfo[playerid][pPass]);
    
INI_Int("Cash",PlayerInfo[playerid][pCash]);
    
INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
    
INI_Int("Kills",PlayerInfo[playerid][pKills]);
    
INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
     return 
1;

Loaduser
Reply
#4

BUMB ? Fast.
Reply
#5

PHP код:
enum pInfo 

    
pPass
    
pCash
    
pAdmin
    
pKills
    
pDeaths,

This should work.
Reply
#6

so what to do now ?
Reply
#7

Try adding semicolon

PHP код:
enum pInfo 

    
pPass
    
pCash
    
pAdmin
    
pKills
    
pDeaths
};//here semicolon 
thats was just assumption but one thing did u declared that structure globally?

EDIT:Lol i just found that you closed that bracket in onplayerconnect and there is no if statement for else
check there
PHP код:
public OnPlayerConnect(playerid

        
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra true, .extra playerid); 
          
ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE"Type your password below to login.","Login","Quit"); 
    } 
//see this one was what i talking about
    
else //there is a if statement for this else
    

         
ShowPlayerDialog(playeridDIALOG_REGISTERDIALOG_STYLE_INPUT,""COL_WHITE"Registering...",""COL_WHITE"Type your password below to register a new account.","Register","Quit"); 
    } 
Reply
#8

Quote:
Originally Posted by Sreyas
Посмотреть сообщение
Try adding semicolon

PHP код:
enum pInfo 

    
pPass
    
pCash
    
pAdmin
    
pKills
    
pDeaths
};//here semicolon 
thats was just assumption but one thing did u declared that structure globally?

EDIT:Lol i just found that you closed that bracket in onplayerconnect and there is no if statement for else
check there
PHP код:
public OnPlayerConnect(playerid

        
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra true, .extra playerid); 
          
ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE"Type your password below to login.","Login","Quit"); 
    } 
//see this one was what i talking about
    
else //there is a if statement for this else
    

         
ShowPlayerDialog(playeridDIALOG_REGISTERDIALOG_STYLE_INPUT,""COL_WHITE"Registering...",""COL_WHITE"Type your password below to register a new account.","Register","Quit"); 
    } 
EDIT : You Right Now 11 Bug still.
Reply
#9

bug? you mean error? listen to my reply carefully you closed onplayerconnect before else and there is a if statement for checking if player already registered
Reply
#10

Quote:
Originally Posted by Sreyas
Посмотреть сообщение
bug? you mean error? listen to my reply carefully you closed onplayerconnect before else and there is a if statement for checking if player already registered
Oh Wrong yeah i mean Erros your OnPlayerConnect is worked Thank you but there is still 11 error
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)