SA-MP Forums Archive
Y_ini-register system error - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Y_ini-register system error (/showthread.php?tid=509682)



Y_ini-register system error - NviDa - 27.04.2014

I followed this tutorial and made a login-reg system.
https://sampforum.blast.hk/showthread.php?tid=273088

I entered my server ,registered an account.And a box opened saying Y_ini works perfectly etc,relog to save your stats.

I did so,but I got these errors in samp_server.exe.



AW: Y_ini-register system error - Macronix - 27.04.2014

Did you create the directory /Users in scriptfiles?


Re: Y_ini-register system error - Mckarlis - 27.04.2014

Create a folder in Scriptfiles folder called Users


Re: Y_ini-register system error - NviDa - 27.04.2014

Thanks!
Btw any tutorial or do you guys now how to make a command /stats which displays the player stats on the chat box?


AW: Y_ini-register system error - Macronix - 27.04.2014

Give me some player variables and i make you a little /stats command


Re: Y_ini-register system error - NviDa - 27.04.2014

Macro ,I don't wanna lie.The register system,I didn't understand almost anything from that tutorial.Its a lot higher than my knowledge in scripting :P (newbie)(i.e player variables?IDK what that is) but I did some searching for /stats and got this up:

pawn Код:
CMD:stats(playerid, params[])
{
    new str[128]
    cash = PATH[ playerid ][ Cash ],
    score = PATH[ playerid ][ Score ],
    deaths = PATH[ playerid ][ Deaths ];

    format (str,sizeof( str ), "Your stats are:Cash: %d | Score: %d | Deaths: %d", a_level, money, score, deaths );
    SendClientMessage(playerid, -1, str );
    return 1;
}
But I am getting 4 errors:
E:\Mohit\samp03z_svr_R1_win32\gamemodes\testserver .pwn(322) : error 001: expected token: ";", but found "-identifier-"
samp03z_svr_R1_win32\gamemodes\testserver.pwn(322) : error 017: undefined symbol "cash"
samp03z_svr_R1_win32\gamemodes\testserver.pwn(322) : error 029: invalid expression, assumed zero
samp03z_svr_R1_win32\gamemodes\testserver.pwn(322) : fatal error 107: too many error messages on one line

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


4 Errors.


AW: Y_ini-register system error - Macronix - 27.04.2014

Okay, here:

pawn Код:
new str[128],
    cash = PATH[ playerid ][ Cash ],
    score = PATH[ playerid ][ Score ],
    deaths = PATH[ playerid ][ Deaths ];
You just forgot a comma
Also replace "money" with "cash"


Re: Y_ini-register system error - NviDa - 27.04.2014

pawn Код:
CMD:stats(playerid, params[])
{
    new str[128],
    cash = PATH[ playerid ][ Cash ],
    score = PATH[ playerid ][ Score ],
    deaths = PATH[ playerid ][ Deaths ];

    format (str,sizeof( str ), "Your stats are: Cash: %d | Score: %d | Deaths: %d", cash, score, deaths );
    SendClientMessage(playerid, -1, str );
    return 1;
}
samp03z_svr_R1_win32\gamemodes\testserver.pwn(322) : error 001: expected token: "-string end-", but found "-identifier-"
samp03z_svr_R1_win32\gamemodes\testserver.pwn(322) : error 029: invalid expression, assumed zero
samp03z_svr_R1_win32\gamemodes\testserver.pwn(322) : warning 215: expression has no effect
samp03z_svr_R1_win32\gamemodes\testserver.pwn(322) : error 001: expected token: ";", but found "]"
samp03z_svr_R1_win32\gamemodes\testserver.pwn(322) : fatal error 107: too many error messages on one line


AW: Y_ini-register system error - Macronix - 27.04.2014

Mmh, if this doesn't work then try this:

pawn Код:
CMD:stats(playerid, params[])
{
    new str[128];
    new cash = PATH[ playerid ][ Cash ];
    new score = PATH[ playerid ][ Score ];
    new deaths = PATH[ playerid ][ Deaths ];

    format (str,sizeof( str ), "Your stats are: Cash: %d | Score: %d | Deaths: %d", cash, score, deaths );
    SendClientMessage(playerid, -1, str );
    return 1;
}
Otherwise if this also doesn't work, show me your "PATH" function/variable


Re: Y_ini-register system error - Ada32 - 27.04.2014

no no no, isn't path a string constant?