Y_ini-register system error
#1

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.
Reply
#2

Did you create the directory /Users in scriptfiles?
Reply
#3

Create a folder in Scriptfiles folder called Users
Reply
#4

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

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

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.
Reply
#7

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"
Reply
#8

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
Reply
#9

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
Reply
#10

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


Forum Jump:


Users browsing this thread: 1 Guest(s)