SA-MP Forums Archive
Smiley face as first character in a string. - 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: Smiley face as first character in a string. (/showthread.php?tid=436902)



Smiley face as first character in a string. - Hoborific - 13.05.2013

pawn Код:
new GotPass[64];
        format(GotPass,sizeof(GotPass),"%s",GetPassword(playerid) );
pawn Код:
forward GetPassword(playerid);
public GetPassword(playerid)
{
    new Player[MAX_PLAYER_NAME],File[45];
    GetPlayerName(playerid, Player, sizeof(Player) );
    format(File,sizeof(File),"Accounts/%s.ini", Player);
    strcpy(PlayerStats[playerid][Password], dini_Get(File,"Password"), 128);
    return 1;
}

pawn Код:
[18:27:24] sdef
[18:27:24] asdef
[18:27:27] sdef
[18:27:27] asdef
[18:27:28] sdef
[18:27:28] asdef
[18:27:29] sdef
[18:27:29] asdef
Top line with the face is GetPassword, inside the file.ini there's no face though. bottom line is the printed inputtext from the dialog.


Re: Smiley face as first character in a string. - Vince - 13.05.2013

The problem is that you're trying to print a value as a string. The function you're calling returns 1 at all times.


Re: Smiley face as first character in a string. - Hoborific - 13.05.2013

I wasn't printing the functions returns, I fixed the problem though it was unrelated to this, thank you though for taking the time to read my thread.


Re: Smiley face as first character in a string. - MP2 - 13.05.2013

Quote:
Originally Posted by Hoborific
Посмотреть сообщение
I wasn't printing the functions returns.
Yes you were. Not directly, but you were.


Re: Smiley face as first character in a string. - Hoborific - 13.05.2013

Quote:
Originally Posted by MP2
Посмотреть сообщение
Yes you were. Not directly, but you were.
Haha, yes. But I think he was implying I was printing the return 1; or so I assumed.