[Help] Auto login + Registration system
#1

Hey hello,

I just created my own registration system.. (but its not finished)
I was working with OnPlayerConnect, with Auto-Login + IP check Name check, and a check if a player is registered or not.

But I got 4 errors namely:

PHP код:
D:\GTA San Andreas\PlanetS\pawno\Admin.pwn(85) : warning 213tag mismatch
D
:\GTA San Andreas\PlanetS\pawno\Admin.pwn(86) : error 035argument type mismatch (argument 1)
D:\GTA San Andreas\PlanetS\pawno\Admin.pwn(86) : error 017undefined symbol "value"
D:\GTA San Andreas\PlanetS\pawno\Admin.pwn(86) : error 035argument type mismatch (argument 2)
D:\GTA San Andreas\PlanetS\pawno\Admin.pwn(86) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
4 Errors

Line 85:
PHP код:
INI:FileCheck INI_Load(str); 
Line 86:
PHP код:
INI_String(FileCheckFileIPsizeof(FileIP)); 
The script:

PHP код:
#include <a_samp>
#include <YSI\y_ini>
#include <dcmd>
#define FILTERSCRIPT
#define PATH "/Users/%s.ini"
#define COLOR_RED 0xFF0000AA
#define COLOR_ORANGE 0xFF9500AA
#define COLOR_YELLOW 0xFFFB00AA
#define COLOR_LIME 0x00FF15AA
enum pInfo
{
    
bool:pBanned,
    
pPass,
    
pLoggedIn,
    
pCash,
    
pAdminLvl,
    
pKills,
    
pDeaths,
    
pIP[16],
    
pColor,
    
pFS,
    
pSkin
}
new 
PlayerInfo[MAX_PLAYERS][pInfo];
forward LoadUser_data(playerid,name[],value[]);
public 
LoadUser_data(playerid,name[],value[])
{
    
INI_Int("Password",PlayerInfo[playerid][pPass]);
    
INI_Int("LoggedIn",PlayerInfo[playerid][pLoggedIn]);
    
INI_Int("Cash",PlayerInfo[playerid][pCash]);
    
INI_Int("AdminLvl",PlayerInfo[playerid][pAdminLvl]);
    
INI_Int("Kills",PlayerInfo[playerid][pKills]);
    
INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
    
INI_Int("IP",PlayerInfo[playerid][pIP]);
    
INI_Int("Color",PlayerInfo[playerid][pColor]);
    
INI_Int("FS",PlayerInfo[playerid][pFS]);
    
INI_Int("Skin",PlayerInfo[playerid][pSkin]);
    return 
1;
}
stock UserPath(playerid)
{
    new 
string[128],playername[MAX_PLAYER_NAME];
    
GetPlayerName(playerid,playername,sizeof(playername));
    
format(string,sizeof(string),PATH,playername);
    return 
string;
}
stock udb_hash(buf[]) {
    new 
length=strlen(buf);
    new 
s1 1;
    new 
s2 0;
    new 
n;
    for (
n=0n<lengthn++)
    {
       
s1 = (s1 buf[n]) % 65521;
       
s2 = (s2 s1)     % 65521;
    }
    return (
s2 << 16) + s1;
}
public 
OnFilterScriptInit()
{
    print(
"<===> Registration loaded <===>");
    return 
1;
}
public 
OnPlayerConnect(playerid)
{
    if(
fexist(UserPath(playerid)))
    {
        new 
name[MAX_PLAYER_NAME], str[128], tmpip[16];
        
GetPlayerIp(playerid,tmpip,sizeof(tmpip));
        
GetPlayerName(playeridnameMAX_PLAYER_NAME);
        
format(strsizeof(str), "LoadUser_%s"name);
        new
            
FileIP[16],
            
INI:FileCheck INI_Load(str);
        
INI_String(FileCheckFileIPsizeof(FileIP));
        
INI_Close(FileCheck);
        if(!
strcmp(FileChecktmp2true))
        {
            
SendClientMessage(playerid,COLOR_LIME,"Automatically Logged In.");
            
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra true, .extra playerid);
        }
        else
        {
            
SendClientMessage(playerid,COLOR_LIME,"Please use the /login command. We could not Automatially Log you in.");
        }
    else
    {
        
SendClientMessage(playerid,COLOR_ORANGE,"You are not registered, please type /register <password> To register here.");
    }
    return 
1;

I hope anyone can help me, i dont know how to fix this

Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)