[Tutorial] Login and Register System - Dialogs - Using SII
#21

Quote:
Originally Posted by Shockey HD
View Post
Very top of script, and the stock goes anywhere, other than that. Good tutorial Kush
Where is anywhere? Step 6 before the includes?
Reply
#22

pawn Code:
#include <a_samp>
#include <SII>

#define DIALOG_REGISTER 2000
#define DIALOG_LOGIN 2001
#define WHITE "{FFFFFF}"
#define RED "{F81414}"
#define GREEN "{00FF22}"
#define LIGHTBLUE "{00CED1}"
new gPlayerName[MAX_PLAYERS][MAX_PLAYER_NAME];

#define TEAM_GROVE 1
#define TEAM_BALLA 2
#define TEAM_VAGOS 3
#define TEAM_GROVE_COLOR 0x00FF00AA // Bright Green (in RGBA format)
#define TEAM_BALLA_COLOR 0xFF00FFAA // Bright Purple
#define TEAM_VAGOS_COLOR 0xFFFF00AA // Yellow
new gTeam[MAX_PLAYERS];

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

enum pInfo
{
    pPass,
    pScore,
    pCash,
    pAdmin,
}
new PlayerInfo[MAX_PLAYERS][pInfo];



stock getINI(playerid)
{
  new account[64];
  format(account,30,"Users/%s.ini",gPlayerName[playerid]);
  return account;
}
Reply
#23

Ehm, thanks, but would you please say what you changed?
Reply
#24

Lol, another error, what's wrong this time?
Code:
deathmatch.pwn(256) : warning 217: loose indentation
Code:
public OnPlayerDisconnect(playerid, reason)
{

if(INI_Open(getINI(playerid))) {

    INI_WriteInt("Score",PlayerInfo[playerid][pScore]);
    INI_WriteInt("Cash",PlayerInfo[playerid][pCash]);
    INI_WriteInt("Admin",PlayerInfo[playerid][pAdmin]);

    INI_Save();
    INI_Close();
    }
    return 1; // what the hell is wrong here?
}
Reply
#25

It means that your line aren't adjusted
pawn Code:
public OnPlayerDisconnect(playerid, reason)
{
    if(INI_Open(getINI(playerid)))
    {
    INI_WriteInt("Score",PlayerInfo[playerid][pScore]);
    INI_WriteInt("Cash",PlayerInfo[playerid][pCash]);
    INI_WriteInt("Admin",PlayerInfo[playerid][pAdmin]);
    INI_Save();
    INI_Close();
    }
    return 1;
}
Reply
#26

I've never expected you to receive so many errors. The tutorial explains each of the functions in depth and their uses.
Reply
#27

Quote:
Originally Posted by samtey
View Post
Lol, another error, what's wrong this time?
Code:
deathmatch.pwn(256) : warning 217: loose indentation
Code:
public OnPlayerDisconnect(playerid, reason)
{

if(INI_Open(getINI(playerid))) {

    INI_WriteInt("Score",PlayerInfo[playerid][pScore]);
    INI_WriteInt("Cash",PlayerInfo[playerid][pCash]);
    INI_WriteInt("Admin",PlayerInfo[playerid][pAdmin]);

    INI_Save();
    INI_Close();
    }
    return 1; // what the hell is wrong here?
}
Many (knowledge people who take time in Pawno) knows exactly what that means. Spend a little time learning what the Warning's mean and what the Errors mean. Also, if your really lazy, you can use TidyPawn
Reply
#28

Kush please help it works but i have sii and yini but... if i register its an fail ini users/name no works not saves the names
Reply
#29

nice.
Reply
#30

This tutorial is nice!But I have an problem.When I type corect password in Login Dialog,it say:"The password is wrong"message!Can you help me?
Reply
#31

Why my Kills Score Death etc is not saving after logout and come again?
Reply
#32

Thank you!
Reply
#33

By far the most beautiful tutorial I have ever read.
Reply
#34

Thank you for your help!
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)