SA-MP Forums Archive
Save last account name registered. - 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: Save last account name registered. (/showthread.php?tid=557799)



Save last account name registered. - Johnny_Ionut - 15.01.2015

He everybody.

pawn Код:
if(Info[playerid][pReg] == 0)
    {
        new sendername[MAX_PLAYER_NAME];
        GetPlayerName(playerid, sendername, sizeof(sendername));
        NOUJ = sendername; //  <<- Here is the problem. How do I enter as otherwise function?
        dini_IntSet("NOUJJ.cfg", "Connections", NOUJ);
I want to save last name account in "NOUJ.cfg" to look at a TextDraw last registered account.
How can I put in another form to be saved Latest Member?


Re: Save last account name registered. - Johnny_Ionut - 15.01.2015

someone help me? please


Re: Save last account name registered. - Johnny_Ionut - 15.01.2015

I try this
pawn Код:
if(Info[playerid][pReg] == 0)
    {
        new asesino[MAX_PLAYER_NAME]
        asesino = GetPlayerNameEx(playerid);// Line 6205
        NOUJ = asesino;//Line 6207
        dini_IntSet("NOUJJ.cfg", "Connections", NOUJ);

but give me errors
pawn Код:
C:\Documents and Settings\JonnY\Desktop\x.pwn(6205) : error 001: expected token: ";", but found "-identifier-"
C:\Documents and Settings\JonnY\Desktop\x.pwn(6207) : error 006: must be assigned to an array
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
Where is the problem?


Re: Save last account name registered. - CalvinC - 15.01.2015

pawn Код:
(Info[playerid][pReg] == 0)
    {
        new asesino[MAX_PLAYER_NAME];
        asesino = GetPlayerNameEx(playerid); // Forgot ; above
        NOUJ = asesino;
        dini_IntSet("NOUJJ.cfg", "Connections", NOUJ);
For NOUJ = asesino;, you need an array, im not sure which one though, try ahead.
Etc. [playerid] or something.


Re: Save last account name registered. - xVIP3Rx - 15.01.2015

Your setting asesino (which is a string) to NOUJ, that's not the correct way to do it and NOUJ isn't even a string, you could do that instead if you wanna extract the player name to NOUJJ.cfg

pawn Код:
(Info[playerid][pReg] == 0)
{
        new name[MAX_PLAYER_NAME];
        GetPlayerName(playerid, name, MAX_PLAYER_NAME);
        dini_IntSet("NOUJJ.cfg", "Connections", name);
}



Re: Save last account name registered. - Johnny_Ionut - 15.01.2015

Quote:
Originally Posted by CalvinC
Посмотреть сообщение
pawn Код:
(Info[playerid][pReg] == 0)
    {
        new asesino[MAX_PLAYER_NAME];
        asesino = GetPlayerNameEx(playerid); // Forgot ; above
        NOUJ = asesino;
        dini_IntSet("NOUJJ.cfg", "Connections", NOUJ);
For NOUJ = asesino;, you need an array, im not sure which one though, try ahead.
Etc. [playerid] or something.
pawn Код:
error 006: must be assigned to an array

Quote:
Originally Posted by xVIP3Rx
Посмотреть сообщение
Your setting asesino (which is a string) to NOUJ, that's not the correct way to do it and NOUJ isn't even a string, you could do that instead if you wanna extract the player name to NOUJJ.cfg

pawn Код:
(Info[playerid][pReg] == 0)
{
        new name[MAX_PLAYER_NAME];
        GetPlayerName(playerid, name, MAX_PLAYER_NAME);
        dini_IntSet("NOUJJ.cfg", "Connections", name);
}
pawn Код:
argument type mismatch (argument 3)  
(on this line) -  dini_IntSet("NOUJJ.cfg", "Connections", name);



Re: Save last account name registered. - Johnny_Ionut - 15.01.2015

Someone can help me to save Who register in NOUJJ.cfg


Re: Save last account name registered. - xVIP3Rx - 15.01.2015

Here you go
pawn Код:
(Info[playerid][pReg] == 0)
{
        new name[MAX_PLAYER_NAME];
        GetPlayerName(playerid, name, MAX_PLAYER_NAME);
        dini_Set("NOUJJ.cfg", "Connections", name);
}