Suggestion file, Y_Ini.
#1

So, I made a suggestion filterscript.

pawn Код:
#include <a_samp>
#include <zcmd>
#include <sscanf>
#include <YSI\y_ini>

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

stock SugPath(playerid)
{
    new string[128],playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid,playername,sizeof(playername));
    format(string,sizeof(string),PATH,playername);
    return string;
}

CMD:sugestie(playerid, params[])
{
    new Suggestion;
    if(sscanf(params,"s", Suggestion)) return SendClientMessage(playerid, -1, "{FFCC33}Folosire: {15FF00}/Sugestie [Sugestie]");
    new INI:File = INI_Open(SugPath(playerid));
    INI_SetTag(File,"Sugestii");
    INI_WriteInt(File,"Sugestie: ", Suggestion);
    INI_Close(File);
    SendClientMessage(playerid, -1, "{FFCC33}Sugestia ta a fost trimisă owner-ului: {FF0000}Teddy {FFCC33}. Vă multumim!");
    return 1;
}
A problem it's, because when I use command if it's more characters than 5 it's show me 'Unknow Error', but if it's less than 5 characters, then it's works fine, but in file, it's showin' me something like:

pawn Код:
[Sugestii]
Sugestie: = 68;
Sugestie: = 68;
Sugestie: = 68;
What's wrong in code?


EDIT: Because I made this thread, I want to know how many filterscripts you can have in 'filescripts' folder and in 'server.cfg'. There it's a limit, or not?

+Rep for helper.
Reply


Messages In This Thread
Suggestion file, Y_Ini. - by HY - 12.12.2014, 15:19
Re: Suggestion file, Y_Ini. - by JeaSon - 12.12.2014, 15:55
Re: Suggestion file, Y_Ini. - by Lordzy - 12.12.2014, 15:55

Forum Jump:


Users browsing this thread: 1 Guest(s)