Register system including password, sex, age and origin?
#1

USELESS & OUTDATED
Reply
#2

edited.
Reply
#3

Quote:

(95) : error 029: invalid expression, assumed zero
(95) : error 004: function "S@@_OnDialogResponse" is not implemented
(96) : warning 217: loose indentation
(97) : error 017: undefined symbol "dialogid"
(101) : error 017: undefined symbol "response"
(102) : error 017: undefined symbol "response"
(104) : error 017: undefined symbol "inputtext"
(107) : error 017: undefined symbol "inputtext"
(117) : error 017: undefined symbol "DIALOG_GENDER"
(124) : warning 225: unreachable code
(124) : error 029: invalid expression, assumed zero
(124) : error 004: function "S@@_OnPlayerDisconnect" is not implemented
(137) : warning 225: unreachable code
(137) : error 029: invalid expression, assumed zero
(137) : error 004: function "S@@_OnPlayerSpawn" is not implemented
(142) : warning 225: unreachable code
(142) : error 029: invalid expression, assumed zero
(142) : error 004: function "S@@_OnPlayerDeath" is not implemented
(144) : error 017: undefined symbol "killerid"
(149) : warning 225: unreachable code
(149) : error 029: invalid expression, assumed zero
(149) : error 004: function "S@@_OnVehicleSpawn" is not implemented
(154) : warning 225: unreachable code
(154) : error 029: invalid expression, assumed zero
(154) : error 004: function "S@@_OnVehicleDeath" is not implemented
(159) : warning 225: unreachable code
(159) : error 029: invalid expression, assumed zero
(159) : error 004: function "S@@_OnPlayerText" is not implemented
(164) : warning 225: unreachable code
(164) : error 029: invalid expression, assumed zero
(164) : error 004: function "S@@_OnPlayerCommandText" is not implemented
(166) : error 017: undefined symbol "cmdtext"
(174) : warning 225: unreachable code
(174) : error 029: invalid expression, assumed zero
(174) : error 004: function "S@@_OnPlayerEnterVehicle" is not implemented

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


26 Errors.

No clue where to place the case codes correctly, tried but I guess it didn't work.

From 95 to 174
PHP код:
       public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    switch( 
dialogid )
    {
        case 
DIALOG_REGISTER:
        {
            if (!
response) return Kick(playerid);
            if(
response)
            {
                if(!
strlen(inputtext)) return ShowPlayerDialog(playeridDIALOG_REGISTERDIALOG_STYLE_INPUT""COL_WHITE"Registering...",""COL_RED"You have entered an invalid password.\n"COL_WHITE"Type your password below to register a new account.","Register","Quit");
                new 
INI:File INI_Open(UserPath(playerid));
                
INI_SetTag(File,"data");
                
INI_WriteInt(File,"Password",udb_hash(inputtext));
                
INI_WriteInt(File,"Cash",0);
                
INI_WriteInt(File,"Admin",0);
                
INI_WriteInt(File,"Kills",0);
                
INI_WriteInt(File,"Deaths",0);
                
INI_Close(File);
                
SetSpawnInfo(playerid001958.331343.1215.36269.15000000);
                
SpawnPlayer(playerid);
                
ShowPlayerDialog(playeridDIALOG_SUCCESS_1DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"Great! Your Y_INI system works perfectly. Relog to save your stats!","Ok","");
                
ShowPlayerDialog(playeridDIALOG_GENDERDIALOG_STYLE_LIST,"Select your gender","Male\nFemale","Ok",""); //edit part
            
}
        }
    }
    return 
1;
}
public 
OnPlayerDisconnect(playeridreason)
{
    new 
INI:File INI_Open(UserPath(playerid));
    
INI_SetTag(File,"data");
    
INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
    
INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
    
INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
    
INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
    
INI_WriteInt(File,"Gender",PlayerInfo[playerid][pSex]);
    
INI_Close(File);
    return 
1;
}
public 
OnPlayerSpawn(playerid)
{
        return 
1;
}
public 
OnPlayerDeath(playeridkilleridreason)
{
    
PlayerInfo[killerid][pKills]++;
    
PlayerInfo[playerid][pDeaths]++;
    return 
1;
}
public 
OnVehicleSpawn(vehicleid)
{
        return 
1;
}
public 
OnVehicleDeath(vehicleidkillerid)
{
        return 
1;
}
public 
OnPlayerText(playeridtext[])
{
        return 
1;
}
public 
OnPlayerCommandText(playeridcmdtext[])
{
        if (
strcmp("/mycommand"cmdtexttrue10) == 0)
        {
                
// Do something here
                
return 1;
        }
        return 
0;
}
public 
OnPlayerEnterVehicle(playeridvehicleidispassenger
Reply
#4

You use Y_INI ? and you copy and paste to your script ?
Reply
#5

Quote:
Originally Posted by SilentSoul
Посмотреть сообщение
You use Y_INI ? and you copy and paste to your script ?
I do use Y_INI yes and I tried to copy and paste to check it it worked, and it didn't. Also I added something which made me get less more errors and you wrote Spublic, is that even anything?
Reply
#6

Yes ofc it wont work , use it as filterscript
Tested: http://pastebin.com/awAq8GcU
Reply
#7

Quote:
Originally Posted by SilentSoul
Посмотреть сообщение
Yes ofc it wont work , use it as filterscript
Tested: http://pastebin.com/awAq8GcU
Alright the bad thing is that you can't write in your gender and it seems like it doesn't get saved as the file gets closed before they asks for gender. Thanks anyways :P
Reply
#8

OPS DELETE.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)