[Pomoc]Compile error

Započeo Deko
6. Jan. 2015. Zaključano
378
pregleda
15
postova
Deko
5
Underboss
6. Jan. 2015.
Skripta koju koristim: //
Detaljan opis problema: Ovako,eo uradio sam neki reg/log po tutu i sad mi dodje ovo
http://i.imgur.com/3GjeFp5.png
kako pravilno da ubacim taj YSI_ini  ja sam ubacio al nece nap. pa da provjerim...

Dio skripte:  /
Neke slike/video za lakse dobivanje pomoci(neobavezno): /
X_G1
4
Enforcer
6. Jan. 2015.
Probaj ovako
#include 
denis_lapi
5
Godfather
6. Jan. 2015.
YSI ubaci u pawno/include i radice ti.

@X_G1 On vec imas ubacenu definiciju, ali nema odakle da cita.
Deko
5
Underboss
denis_lapi
5
Godfather
6. Jan. 2015.
Pogledaj da li unutar YSI foldera ima y_ini fajl. Takodje, daj da vidim i kako si napisao include tj. definiciju.
Deko
5
Underboss
6. Jan. 2015.
hahah bio
a sad kad sam compile doslo ovo
http://i.imgur.com/HXlIhGF.png
denis_lapi
5
Godfather
6. Jan. 2015.
Daj ti nama kod, mani se slika, ne mogu sa slikama da radim nista..
Deko
5
Underboss
6. Jan. 2015.
haha pa fino reci eo ti cijela skripta

#include
#include
//
#define DIALOG REGISTER 1
#define DIALOG_LOGIN 2
#define DIALOG_SUCCESS_1 3
#define DIALOG_SUCCESS_2 4
#DEFINE PATH "/Users/%s.ini"
#define COL_WHITE "{FFFFFF}"
#define COL_RED "{F81414}
#define COL_GREEN "{00FF22}"
#define COL_LIGHTBLUE "{00CED1}"
//
enum pInfo
{
pPassword
pNovac
pAdmin
pGameSage
pUbistva
pUmiranje
}
new PlayerInfo;
//
forward LoadUser_data(playerid,name[],value[]):
public  LoadUser_data(playerid,name[],value[])
{
INI_Int("Password",PlayerInfo);
INI_Int("Novac",PlayerInfo);
INI_Int("Admin",PlayerInfo);
INI_Int("GameSage",PlayerInfo);
INI_Int("Ubistva",PlayerInfo);
INI_Int("Umiranje",PlayerInfo);
return 1;
}
//
stock UserPath(playerid)
{
new string,playername;
GetPlayerName(playerid,playername,sizeof(playename));
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=0; n {
  s1 = (s1 + buf) % 65521;
  s2 = (s2 + s1)    % 65521;
}
return (s2 << 16) + s1
}
//
public OnPlayerConnect(playerid)
{
if(fexist(UserPath(playerid)))
{
    INI_ParseFile(UserPath(playeid), "LoadUser_%s", .bExtra = true, .extra = playerid);
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE"Upisite svoj password za logiranje.",
}
else
{
    ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,""COL_WHITE"Registracija...",""COL_WHITE"Upisite zeljeni pasword za registraciju novog accounta","Registriraj","Izadji");
}
return 1;
}
//
public OnDialogResponse(playerid,dialogid,response,listitem,inputtext[])
{
switch( dialogid )
{
    case DIALOG_REGISTER:
    {
if (!response)return Kick(playerid)
if(response)
{
    if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER,DIALOG_STYLE_INPUT, ""COL_wHITE"Registracija...",""COL_RED"Unijeliste netacan password.\n"COL_WHITE"Unesite password za registraciju novog accounta.","Registriraj","Izadji");
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"Datum");
INI_WriteInt(File,"Password",udb_hash(inputtext));
INI_WriteInt(File,"Novac",0);
INI_WriteInt(File,"Admin",0);
INI_WriteInt(File,"Ubistva",0);
INI_WriteInt(File,"Umiranje",0);
INI_Close(File);

SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
ShowPlayerDialog(playerid, DIALOG_SUCCESS_1, DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"Odlicno!Vas Y_INI system radi perfektno.Relog za sacuvanje tvog statsa!","Ok","");
}
}

case DIALOG_LOGIN:
{
if ( !response ) return Kick ( playerid ) ;
if ( response )
{
if(udb_hash(inputtext) == PlayerInfo)
{
    INI_ParseFile(UserPath(playerid),"LoadUser_%s", .bExtra = true, .extra = playerid);
    GivePlayerMoney(playerid, PlayerInfo);
    ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_RED"Upisali ste netacan password.\n"COL_WHITE"Upisite vas password za logiranje","Login","Quit");
}
return 1;
}
}
}
return 1;
}
//new
public OnPlayerDisconnect(playerid, reason)
{
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"Datum");
INI_WriteInt(File,"Novac",GetPlayerMoney(playerid));
INI_WriteInt(File,"Admin",PlayerInfo);
INI_WriteInt(File,"GameSage",PlayerInfo);
INI_WriteInt(File,"Ubistva",PlayerInfo);
INI_WeriteInt(File,"Umiranje",PlayerInfo);
INI_Close(File);
return 1;
}
//
public OnPlayerDeath(playerid, killerid, reason)
{
PlayerInfo++;
PlayerInfo++;
return 1;
}
//
public OnPlayerSpawn(playerid)
{
    AddPlayerClass(16,-2706.4011,376.2834,4.9686,182.0843,0,0,0,0,0,0); //
return 1;
}
public OnGameModeInit()
{
CreateObject(1215, -2708.1001, 378.10001, 11.5, 0, 0, 0);
CreateObject(1215, -2704.5, 374.20001, 9.5, 0, 0, 0);
CreateObject(1257, -2741.6001, 403.79999, 4.6, 0, 0, 0);
CreateObject(1571, -2687, 384.5, 4.7, 0, 0, 0);
CreateObject(924, -2684.3999, 385.79999, 3.5, 0, 0, 0);
CreateObject(14467, -2608.3999, 369.60001, -127.9, 0, 0, 92);
CreateObject(1363, -2716.8999, 344.39999, 4.3, 0, 0, 0);
CreateObject(3877, -2716.3, 405.79999, 5.5, 0, 0, 0);
CreateObject(3877, -2696.3, 405.70001, 5.5, 0, 0, 0);
CreateObject(3877, -2716.3, 345.5, 5.6, 0, 0, 0);
CreateObject(3877, -2696.2, 345.89999, 5.6, 0, 0, 0);
CreateObject(3877, -2673.2, 360.10001, 5.6, 0, 0, 0);
CreateObject(3877, -2673.3999, 391.10001, 5.5, 0, 0, 0);
CreateObject(3877, -2738.8999, 391, 5.5, 0, 0, 0);
CreateObject(3877, -2739, 360.20001, 5.6, 0, 0, 0);
return 1;
}
denis_lapi
5
Godfather
6. Jan. 2015.
Stavi ovo

#define PATH "/Users/%s.ini"


Ovo zameni

ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE"Upisite svoj password za logiranje.");

if(!response) return Kick(playerid);
Deko
5
Underboss
6. Jan. 2015.
Bas si pomogao... mogao si samo edit gjde treba... 🙂

#include
#include
//
#define DIALOG REGISTER 1
#define DIALOG_LOGIN 2
#define DIALOG_SUCCESS_1 3
#define DIALOG_SUCCESS_2 4
#define PATH "/Users/%s.ini"
#define COL_WHITE "{FFFFFF}"
#define COL_RED "{F81414}
#define COL_GREEN "{00FF22}"
#define COL_LIGHTBLUE "{00CED1}"
//
enum pInfo
{
pPassword
pNovac
pAdmin
pGameSage
pUbistva
pUmiranje
}
new PlayerInfo;
//
forward LoadUser_data(playerid,name[],value[]):
public  LoadUser_data(playerid,name[],value[])
{
INI_Int("Password",PlayerInfo);
INI_Int("Novac",PlayerInfo);
INI_Int("Admin",PlayerInfo);
INI_Int("GameSage",PlayerInfo);
INI_Int("Ubistva",PlayerInfo);
INI_Int("Umiranje",PlayerInfo);
return 1;
}
//
stock UserPath(playerid)
{
new string,playername;
GetPlayerName(playerid,playername,sizeof(playename));
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=0; n {
  s1 = (s1 + buf) % 65521;
  s2 = (s2 + s1)    % 65521;
}
return (s2 << 16) + s1
}
//
public OnPlayerConnect(playerid)
{
if(fexist(UserPath(playerid)))
{
    INI_ParseFile(UserPath(playeid), "LoadUser_%s", .bExtra = true, .extra = playerid);
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE"Upisite svoj password za logiranje.");
}
else
{
    ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,""COL_WHITE"Registracija...",""COL_WHITE"Upisite zeljeni pasword za registraciju novog accounta","Registriraj","Izadji");
}
return 1;
}
//
public OnDialogResponse(playerid,dialogid,response,listitem,inputtext[])
{
switch( dialogid )
{
    case DIALOG_REGISTER:
    {
if(!response) return Kick(playerid);
if(response)
{
    if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER,DIALOG_STYLE_INPUT, ""COL_wHITE"Registracija...",""COL_RED"Unijeliste netacan password.\n"COL_WHITE"Unesite password za registraciju novog accounta.","Registriraj","Izadji");
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"Datum");
INI_WriteInt(File,"Password",udb_hash(inputtext));
INI_WriteInt(File,"Novac",0);
INI_WriteInt(File,"Admin",0);
INI_WriteInt(File,"Ubistva",0);
INI_WriteInt(File,"Umiranje",0);
INI_Close(File);

SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
ShowPlayerDialog(playerid, DIALOG_SUCCESS_1, DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"Odlicno!Vas Y_INI system radi perfektno.Relog za sacuvanje tvog statsa!","Ok","");
}
}

case DIALOG_LOGIN:
{
if(!response) return Kick(playerid);
if ( response )
{
if(udb_hash(inputtext) == PlayerInfo)
{
    INI_ParseFile(UserPath(playerid),"LoadUser_%s", .bExtra = true, .extra = playerid);
    GivePlayerMoney(playerid, PlayerInfo);
    ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_RED"Upisali ste netacan password.\n"COL_WHITE"Upisite vas password za logiranje","Login","Quit");
}
return 1;
}
}
}
return 1;
}
//new
public OnPlayerDisconnect(playerid, reason)
{
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"Datum");
INI_WriteInt(File,"Novac",GetPlayerMoney(playerid));
INI_WriteInt(File,"Admin",PlayerInfo);
INI_WriteInt(File,"GameSage",PlayerInfo);
INI_WriteInt(File,"Ubistva",PlayerInfo);
INI_WeriteInt(File,"Umiranje",PlayerInfo);
INI_Close(File);
return 1;
}
//
public OnPlayerDeath(playerid, killerid, reason)
{
PlayerInfo++;
PlayerInfo++;
return 1;
}
//
public OnPlayerSpawn(playerid)
{
    AddPlayerClass(16,-2706.4011,376.2834,4.9686,182.0843,0,0,0,0,0,0); //
return 1;
}
public OnGameModeInit()
{
CreateObject(1215, -2708.1001, 378.10001, 11.5, 0, 0, 0);
CreateObject(1215, -2704.5, 374.20001, 9.5, 0, 0, 0);
CreateObject(1257, -2741.6001, 403.79999, 4.6, 0, 0, 0);
CreateObject(1571, -2687, 384.5, 4.7, 0, 0, 0);
CreateObject(924, -2684.3999, 385.79999, 3.5, 0, 0, 0);
CreateObject(14467, -2608.3999, 369.60001, -127.9, 0, 0, 92);
CreateObject(1363, -2716.8999, 344.39999, 4.3, 0, 0, 0);
CreateObject(3877, -2716.3, 405.79999, 5.5, 0, 0, 0);
CreateObject(3877, -2696.3, 405.70001, 5.5, 0, 0, 0);
CreateObject(3877, -2716.3, 345.5, 5.6, 0, 0, 0);
CreateObject(3877, -2696.2, 345.89999, 5.6, 0, 0, 0);
CreateObject(3877, -2673.2, 360.10001, 5.6, 0, 0, 0);
CreateObject(3877, -2673.3999, 391.10001, 5.5, 0, 0, 0);
CreateObject(3877, -2738.8999, 391, 5.5, 0, 0, 0);
CreateObject(3877, -2739, 360.20001, 5.6, 0, 0, 0);
return 1;
}


opet nece ima 18 errora
denis_lapi
5
Godfather
6. Jan. 2015.
Deko wrote on January 6, 2015, 5:45 pm:
Bas si pomogao... mogao si samo edit gjde treba... 🙂

#include
#include
//
#define DIALOG REGISTER 1
#define DIALOG_LOGIN 2
#define DIALOG_SUCCESS_1 3
#define DIALOG_SUCCESS_2 4
#define PATH "/Users/%s.ini"
#define COL_WHITE "{FFFFFF}"
#define COL_RED "{F81414}
#define COL_GREEN "{00FF22}"
#define COL_LIGHTBLUE "{00CED1}"
//
enum pInfo
{
pPassword
pNovac
pAdmin
pGameSage
pUbistva
pUmiranje
}
new PlayerInfo;
//
forward LoadUser_data(playerid,name[],value[]):
public  LoadUser_data(playerid,name[],value[])
{
INI_Int("Password",PlayerInfo);
INI_Int("Novac",PlayerInfo);
INI_Int("Admin",PlayerInfo);
INI_Int("GameSage",PlayerInfo);
INI_Int("Ubistva",PlayerInfo);
INI_Int("Umiranje",PlayerInfo);
return 1;
}
//
stock UserPath(playerid)
{
new string,playername;
GetPlayerName(playerid,playername,sizeof(playename));
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=0; n {
  s1 = (s1 + buf) % 65521;
  s2 = (s2 + s1)    % 65521;
}
return (s2 << 16) + s1
}
//
public OnPlayerConnect(playerid)
{
if(fexist(UserPath(playerid)))
{
    INI_ParseFile(UserPath(playeid), "LoadUser_%s", .bExtra = true, .extra = playerid);
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE"Upisite svoj password za logiranje.");
}
else
{
    ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,""COL_WHITE"Registracija...",""COL_WHITE"Upisite zeljeni pasword za registraciju novog accounta","Registriraj","Izadji");
}
return 1;
}
//
public OnDialogResponse(playerid,dialogid,response,listitem,inputtext[])
{
switch( dialogid )
{
    case DIALOG_REGISTER:
    {
if(!response) return Kick(playerid);
if(response)
{
    if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER,DIALOG_STYLE_INPUT, ""COL_wHITE"Registracija...",""COL_RED"Unijeliste netacan password.\n"COL_WHITE"Unesite password za registraciju novog accounta.","Registriraj","Izadji");
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"Datum");
INI_WriteInt(File,"Password",udb_hash(inputtext));
INI_WriteInt(File,"Novac",0);
INI_WriteInt(File,"Admin",0);
INI_WriteInt(File,"Ubistva",0);
INI_WriteInt(File,"Umiranje",0);
INI_Close(File);

SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
ShowPlayerDialog(playerid, DIALOG_SUCCESS_1, DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"Odlicno!Vas Y_INI system radi perfektno.Relog za sacuvanje tvog statsa!","Ok","");
}
}

case DIALOG_LOGIN:
{
if(!response) return Kick(playerid);
if ( response )
{
if(udb_hash(inputtext) == PlayerInfo)
{
    INI_ParseFile(UserPath(playerid),"LoadUser_%s", .bExtra = true, .extra = playerid);
    GivePlayerMoney(playerid, PlayerInfo);
    ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_RED"Upisali ste netacan password.\n"COL_WHITE"Upisite vas password za logiranje","Login","Quit");
}
return 1;
}
}
}
return 1;
}
//new
public OnPlayerDisconnect(playerid, reason)
{
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"Datum");
INI_WriteInt(File,"Novac",GetPlayerMoney(playerid));
INI_WriteInt(File,"Admin",PlayerInfo);
INI_WriteInt(File,"GameSage",PlayerInfo);
INI_WriteInt(File,"Ubistva",PlayerInfo);
INI_WeriteInt(File,"Umiranje",PlayerInfo);
INI_Close(File);
return 1;
}
//
public OnPlayerDeath(playerid, killerid, reason)
{
PlayerInfo++;
PlayerInfo++;
return 1;
}
//
public OnPlayerSpawn(playerid)
{
    AddPlayerClass(16,-2706.4011,376.2834,4.9686,182.0843,0,0,0,0,0,0); //
return 1;
}
public OnGameModeInit()
{
CreateObject(1215, -2708.1001, 378.10001, 11.5, 0, 0, 0);
CreateObject(1215, -2704.5, 374.20001, 9.5, 0, 0, 0);
CreateObject(1257, -2741.6001, 403.79999, 4.6, 0, 0, 0);
CreateObject(1571, -2687, 384.5, 4.7, 0, 0, 0);
CreateObject(924, -2684.3999, 385.79999, 3.5, 0, 0, 0);
CreateObject(14467, -2608.3999, 369.60001, -127.9, 0, 0, 92);
CreateObject(1363, -2716.8999, 344.39999, 4.3, 0, 0, 0);
CreateObject(3877, -2716.3, 405.79999, 5.5, 0, 0, 0);
CreateObject(3877, -2696.3, 405.70001, 5.5, 0, 0, 0);
CreateObject(3877, -2716.3, 345.5, 5.6, 0, 0, 0);
CreateObject(3877, -2696.2, 345.89999, 5.6, 0, 0, 0);
CreateObject(3877, -2673.2, 360.10001, 5.6, 0, 0, 0);
CreateObject(3877, -2673.3999, 391.10001, 5.5, 0, 0, 0);
CreateObject(3877, -2738.8999, 391, 5.5, 0, 0, 0);
CreateObject(3877, -2739, 360.20001, 5.6, 0, 0, 0);
return 1;
}


opet nece ima 18 errora

Hoces mozda kurirskom sluzbom da ti posaljem skriptu?! 😮 Celu sistem si copy/paste, pa bi i sad, samo da nalepis i da te bude briga. Ako tako mislis da ucis bolje se mani posla na samom pocetku

To su neki errori koji su bili ocigledni, daj mi ponovo listu errora i daj ponovo celu skriptu.
Deko
5
Underboss
6. Jan. 2015.
HAHAHAHAHA,ok
eto ti gore cele skripte al eo ti je opet

#include
#include
//
#define DIALOG REGISTER 1
#define DIALOG_LOGIN 2
#define DIALOG_SUCCESS_1 3
#define DIALOG_SUCCESS_2 4
#define PATH "/Users/%s.ini"
#define COL_WHITE "{FFFFFF}"
#define COL_RED "{F81414}
#define COL_GREEN "{00FF22}"
#define COL_LIGHTBLUE "{00CED1}"
//
enum pInfo
{
pPassword
pNovac
pAdmin
pGameSage
pUbistva
pUmiranje
}
new PlayerInfo;
//
forward LoadUser_data(playerid,name[],value[]):
public  LoadUser_data(playerid,name[],value[])
{
INI_Int("Password",PlayerInfo);
INI_Int("Novac",PlayerInfo);
INI_Int("Admin",PlayerInfo);
INI_Int("GameSage",PlayerInfo);
INI_Int("Ubistva",PlayerInfo);
INI_Int("Umiranje",PlayerInfo);
return 1;
}
//
stock UserPath(playerid)
{
new string,playername;
GetPlayerName(playerid,playername,sizeof(playename));
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=0; n {
  s1 = (s1 + buf) % 65521;
  s2 = (s2 + s1)    % 65521;
}
return (s2 << 16) + s1
}
//
public OnPlayerConnect(playerid)
{
if(fexist(UserPath(playerid)))
{
    INI_ParseFile(UserPath(playeid), "LoadUser_%s", .bExtra = true, .extra = playerid);
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE"Upisite svoj password za logiranje.");
}
else
{
    ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,""COL_WHITE"Registracija...",""COL_WHITE"Upisite zeljeni pasword za registraciju novog accounta","Registriraj","Izadji");
}
return 1;
}
//
public OnDialogResponse(playerid,dialogid,response,listitem,inputtext[])
{
switch( dialogid )
{
    case DIALOG_REGISTER:
    {
if(!response) return Kick(playerid);
if(response)
{
    if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER,DIALOG_STYLE_INPUT, ""COL_wHITE"Registracija...",""COL_RED"Unijeliste netacan password.\n"COL_WHITE"Unesite password za registraciju novog accounta.","Registriraj","Izadji");
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"Datum");
INI_WriteInt(File,"Password",udb_hash(inputtext));
INI_WriteInt(File,"Novac",0);
INI_WriteInt(File,"Admin",0);
INI_WriteInt(File,"Ubistva",0);
INI_WriteInt(File,"Umiranje",0);
INI_Close(File);

SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
ShowPlayerDialog(playerid, DIALOG_SUCCESS_1, DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"Odlicno!Vas Y_INI system radi perfektno.Relog za sacuvanje tvog statsa!","Ok","");
}
}

case DIALOG_LOGIN:
{
if(!response) return Kick(playerid);
if ( response )
{
if(udb_hash(inputtext) == PlayerInfo)
{
    INI_ParseFile(UserPath(playerid),"LoadUser_%s", .bExtra = true, .extra = playerid);
    GivePlayerMoney(playerid, PlayerInfo);
    ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_RED"Upisali ste netacan password.\n"COL_WHITE"Upisite vas password za logiranje","Login","Quit");
}
return 1;
}
}
}
return 1;
}
//new
public OnPlayerDisconnect(playerid, reason)
{
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"Datum");
INI_WriteInt(File,"Novac",GetPlayerMoney(playerid));
INI_WriteInt(File,"Admin",PlayerInfo);
INI_WriteInt(File,"GameSage",PlayerInfo);
INI_WriteInt(File,"Ubistva",PlayerInfo);
INI_WeriteInt(File,"Umiranje",PlayerInfo);
INI_Close(File);
return 1;
}
//
public OnPlayerDeath(playerid, killerid, reason)
{
PlayerInfo++;
PlayerInfo++;
return 1;
}
//
public OnPlayerSpawn(playerid)
{
    AddPlayerClass(16,-2706.4011,376.2834,4.9686,182.0843,0,0,0,0,0,0); //
return 1;
}
public OnGameModeInit()
{
CreateObject(1215, -2708.1001, 378.10001, 11.5, 0, 0, 0);
CreateObject(1215, -2704.5, 374.20001, 9.5, 0, 0, 0);
CreateObject(1257, -2741.6001, 403.79999, 4.6, 0, 0, 0);
CreateObject(1571, -2687, 384.5, 4.7, 0, 0, 0);
CreateObject(924, -2684.3999, 385.79999, 3.5, 0, 0, 0);
CreateObject(14467, -2608.3999, 369.60001, -127.9, 0, 0, 92);
CreateObject(1363, -2716.8999, 344.39999, 4.3, 0, 0, 0);
CreateObject(3877, -2716.3, 405.79999, 5.5, 0, 0, 0);
CreateObject(3877, -2696.3, 405.70001, 5.5, 0, 0, 0);
CreateObject(3877, -2716.3, 345.5, 5.6, 0, 0, 0);
CreateObject(3877, -2696.2, 345.89999, 5.6, 0, 0, 0);
CreateObject(3877, -2673.2, 360.10001, 5.6, 0, 0, 0);
CreateObject(3877, -2673.3999, 391.10001, 5.5, 0, 0, 0);
CreateObject(3877, -2738.8999, 391, 5.5, 0, 0, 0);
CreateObject(3877, -2739, 360.20001, 5.6, 0, 0, 0);
return 1;
}


eo ti errori
http://i.imgur.com/StMMua1.png
Rudimental
5
OG Legend
6. Jan. 2015.
Sto bi se reklo sad ces dobiti sve na gotovo ali sledeci put ces morati i sam da se snadjes. Imao si ovde 15-20-tak gresaka tako da sam ti sve sredio...

#include
#include
//
#define DIALOG_REGISTER 1
#define DIALOG_LOGIN 2
#define DIALOG_SUCCESS_1 3
#define DIALOG_SUCCESS_2 4
#define PATH "/Users/%s.ini"
#define COL_WHITE "{FFFFFF}"
#define COL_RED "{F81414}
#define COL_GREEN "{00FF22}"
#define COL_LIGHTBLUE "{00CED1}"
//

forward LoadUser_data(playerid,name[],value[]);

enum pInfo
{
pPassword,
pNovac,
pAdmin,
pGameSage,
pUbistva,
pUmiranje
}
new PlayerInfo;
//
public LoadUser_data(playerid,name[],value[])
{
INI_Int("Password",PlayerInfo);
INI_Int("Novac",PlayerInfo);
INI_Int("Admin",PlayerInfo);
INI_Int("GameSage",PlayerInfo);
INI_Int("Ubistva",PlayerInfo);
INI_Int("Umiranje",PlayerInfo);
return 1;
}

public OnPlayerConnect(playerid)
{
if(fexist(UserPath(playerid)))
{
    INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Login","Upisite svoj password za logiranje.", "Ok", "Close");
}
else
{
ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,""COL_WHITE"Registracija...",""COL_WHITE"Upisite zeljeni pasword za registraciju novog accounta","Registriraj","Izadji");
}
return 1;
}
//
public OnDialogResponse(playerid,dialogid,response,listitem,inputtext[])
{
switch( dialogid )
{
case DIALOG_REGISTER:
{
if(!response) return Kick(playerid);
if(response)
{
if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER,DIALOG_STYLE_INPUT, "Registracija","Unijeliste netacan password.\nUnesite password za registraciju novog accounta.","Registriraj","Izadji");
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"Datum");
INI_WriteInt(File,"Password",udb_hash(inputtext));
INI_WriteInt(File,"Novac",0);
INI_WriteInt(File,"Admin",0);
INI_WriteInt(File,"Ubistva",0);
INI_WriteInt(File,"Umiranje",0);
INI_Close(File);

SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
ShowPlayerDialog(playerid, DIALOG_SUCCESS_1, DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"Odlicno!Vas Y_INI system radi perfektno.Relog za sacuvanje tvog statsa!","Ok","");
}
}
case DIALOG_LOGIN:
{
if(!response) return Kick(playerid);
if ( response )
{
if(udb_hash(inputtext) == PlayerInfo)
{
INI_ParseFile(UserPath(playerid),"LoadUser_%s", .bExtra = true, .extra = playerid);
GivePlayerMoney(playerid, PlayerInfo);
ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_INPUT,"Login","Upisali ste netacan password.\nUpisite vas password za logiranje","Login","Quit");
}
}
}
}
return 1;
}
//new
public OnPlayerDisconnect(playerid, reason)
{
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"Datum");
INI_WriteInt(File,"Novac",GetPlayerMoney(playerid));
INI_WriteInt(File,"Admin",PlayerInfo);
INI_WriteInt(File,"GameSage",PlayerInfo);
INI_WriteInt(File,"Ubistva",PlayerInfo);
INI_WriteInt(File,"Umiranje",PlayerInfo);
INI_Close(File);
return 1;
}
//
public OnPlayerDeath(playerid, killerid, reason)
{
PlayerInfo++;
PlayerInfo++;
return 1;
}
//
public OnPlayerSpawn(playerid)
{
    AddPlayerClass(16,-2706.4011,376.2834,4.9686,182.0843,0,0,0,0,0,0); //
return 1;
}
public OnGameModeInit()
{
CreateObject(1215, -2708.1001, 378.10001, 11.5, 0, 0, 0);
CreateObject(1215, -2704.5, 374.20001, 9.5, 0, 0, 0);
CreateObject(1257, -2741.6001, 403.79999, 4.6, 0, 0, 0);
CreateObject(1571, -2687, 384.5, 4.7, 0, 0, 0);
CreateObject(924, -2684.3999, 385.79999, 3.5, 0, 0, 0);
CreateObject(14467, -2608.3999, 369.60001, -127.9, 0, 0, 92);
CreateObject(1363, -2716.8999, 344.39999, 4.3, 0, 0, 0);
CreateObject(3877, -2716.3, 405.79999, 5.5, 0, 0, 0);
CreateObject(3877, -2696.3, 405.70001, 5.5, 0, 0, 0);
CreateObject(3877, -2716.3, 345.5, 5.6, 0, 0, 0);
CreateObject(3877, -2696.2, 345.89999, 5.6, 0, 0, 0);
CreateObject(3877, -2673.2, 360.10001, 5.6, 0, 0, 0);
CreateObject(3877, -2673.3999, 391.10001, 5.5, 0, 0, 0);
CreateObject(3877, -2738.8999, 391, 5.5, 0, 0, 0);
CreateObject(3877, -2739, 360.20001, 5.6, 0, 0, 0);
return 1;
}

//
stock UserPath(playerid)
{
new string,playername;
GetPlayerName(playerid,playername,sizeof(playername));
format(string,sizeof(string),PATH,playername);
return string;
}
//
stock udb_hash(buf[])
{
    new
length = strlen(buf),
    s1 = 1,
    s2 = 0,
    n;
    for (n = 0; n < length; n++)
    {
      s1 = (s1 + buf) % 65521;
      s2 = (s2 + s1)    % 65521;
    }
    return (s2 << 16) + s1;
}
//

Deko
5
Underboss
6. Jan. 2015.
HAHAHA hvala punooooooooooooooooooooooo

feeling uradjena registracija/login xd

nije problem al kad ima 10ak onih
"if(!response) return Kick(playerid);"
pa sad nezz jel treba jedno il sve ? ugl oodo testati,moze lock
denis_lapi
5
Godfather
6. Jan. 2015.
Evo ti sve greske sredjene. I prepisuj kako valjda, nemoj da jedes slova..


#include
#include
//
#define DIALOG_REGISTER 1
#define DIALOG_LOGIN 2
#define DIALOG_SUCCESS_1 3
#define DIALOG_SUCCESS_2 4
#define PATH "/Users/%s.ini"
#define COL_WHITE "{FFFFFF}"
#define COL_RED "{F81414}
#define COL_GREEN "{00FF22}"
#define COL_LIGHTBLUE "{00CED1}"
//
enum pInfo
{
pPassword,
pNovac,
pAdmin,
pGameSage,
pUbistva,
pUmiranje
};

new PlayerInfo;

forward LoadUser_data(playerid,name[],value[]);
public  LoadUser_data(playerid,name[],value[])
{
INI_Int("Password",PlayerInfo);
INI_Int("Novac",PlayerInfo);
INI_Int("Admin",PlayerInfo);
INI_Int("GameSage",PlayerInfo);
INI_Int("Ubistva",PlayerInfo);
INI_Int("Umiranje",PlayerInfo);
return 1;
}
//
stock UserPath(playerid)
{
new string,playername;
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=0; n {
  s1 = (s1 + buf) % 65521;
  s2 = (s2 + s1)    % 65521;
}
return (s2 << 16) + s1;
}
//
public OnPlayerConnect(playerid)
{
if(fexist(UserPath(playerid)))
{
    INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE"Upisite svoj password za logiranje.","Ok","quit");
}
else
{
ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,""COL_WHITE"Registracija...",""COL_WHITE"Upisite zeljeni pasword za registraciju novog accounta","Registriraj","Izadji");
}
return 1;
}
//
public OnDialogResponse(playerid,dialogid,response,listitem,inputtext[])
{
switch( dialogid )
{
case DIALOG_REGISTER:
{
if(!response) return Kick(playerid);
if(response)
{
    if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER,DIALOG_STYLE_INPUT, "Registracija...","Unijeliste netacan password.\nUnesite password za registraciju novog accounta.","Registriraj","Izadji");
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"Datum");
INI_WriteInt(File,"Password",udb_hash(inputtext));
INI_WriteInt(File,"Novac",0);
INI_WriteInt(File,"Admin",0);
INI_WriteInt(File,"Ubistva",0);
INI_WriteInt(File,"Umiranje",0);
INI_Close(File);
SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
ShowPlayerDialog(playerid, DIALOG_SUCCESS_1, DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"Odlicno!Vas Y_INI system radi perfektno.Relog za sacuvanje tvog statsa!","Ok","");
}
}
case DIALOG_LOGIN:
{
if(!response) return Kick(playerid);
if ( response )
{
if(udb_hash(inputtext) == PlayerInfo)
{
INI_ParseFile(UserPath(playerid),"LoadUser_%s", .bExtra = true, .extra = playerid);
GivePlayerMoney(playerid, PlayerInfo);
ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_INPUT,"Login","Upisali ste netacan password.\nUpisite vas password za logiranje","Login","Quit");
}
}
}
}
return 1;
}
//new
public OnPlayerDisconnect(playerid, reason)
{
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"Datum");
INI_WriteInt(File,"Novac",GetPlayerMoney(playerid));
INI_WriteInt(File,"Admin",PlayerInfo);
INI_WriteInt(File,"GameSage",PlayerInfo);
INI_WriteInt(File,"Ubistva",PlayerInfo);
INI_WriteInt(File,"Umiranje",PlayerInfo);
INI_Close(File);
return 1;
}
//
public OnPlayerDeath(playerid, killerid, reason)
{
PlayerInfo++;
PlayerInfo++;
return 1;
}
//
public OnPlayerSpawn(playerid)
{
    AddPlayerClass(16,-2706.4011,376.2834,4.9686,182.0843,0,0,0,0,0,0); //
return 1;
}
public OnGameModeInit()
{
CreateObject(1215, -2708.1001, 378.10001, 11.5, 0, 0, 0);
CreateObject(1215, -2704.5, 374.20001, 9.5, 0, 0, 0);
CreateObject(1257, -2741.6001, 403.79999, 4.6, 0, 0, 0);
CreateObject(1571, -2687, 384.5, 4.7, 0, 0, 0);
CreateObject(924, -2684.3999, 385.79999, 3.5, 0, 0, 0);
CreateObject(14467, -2608.3999, 369.60001, -127.9, 0, 0, 92);
CreateObject(1363, -2716.8999, 344.39999, 4.3, 0, 0, 0);
CreateObject(3877, -2716.3, 405.79999, 5.5, 0, 0, 0);
CreateObject(3877, -2696.3, 405.70001, 5.5, 0, 0, 0);
CreateObject(3877, -2716.3, 345.5, 5.6, 0, 0, 0);
CreateObject(3877, -2696.2, 345.89999, 5.6, 0, 0, 0);
CreateObject(3877, -2673.2, 360.10001, 5.6, 0, 0, 0);
CreateObject(3877, -2673.3999, 391.10001, 5.5, 0, 0, 0);
CreateObject(3877, -2738.8999, 391, 5.5, 0, 0, 0);
CreateObject(3877, -2739, 360.20001, 5.6, 0, 0, 0);
return 1;
}

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha