Y_INI Problem. -
streetpeace - 31.01.2014
Hello all!
I want some help with my function :
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Ban",1);
INI_WriteInt(File,"NomAdmin",PlayerName(playerid)) ;
INI_WriteInt(File,"RaisonBan",params);
INI_Close(File);
NomAdmin and RaisonBan don't work! I don't know why! There is an other function to write name and her reasons? Please help me.
Re: Y_INI Problem. -
Excelize - 31.01.2014
Show us your whole code, and when pasting code, use the code button, so it's readable.
Re: Y_INI Problem. -
streetpeace - 31.01.2014
http://pastebin.com/w1nB5gUV
Warnings :
C:\Users\info\Desktop\LSC-RP\gamemodes\Beta.pwn(741) : error 035: argument type mismatch (argument 3)
C:\Users\info\Desktop\LSC-RP\gamemodes\Beta.pwn(742) : error 035: argument type mismatch (argument 3)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
Re: Y_INI Problem. -
BroZeus - 31.01.2014
can u tell in code which two line has this error?
Re: Y_INI Problem. -
Burridge - 31.01.2014
Why are you writing the player's name, and the ban reason to an integer? Use INI_WriteString for that!
Re: Y_INI Problem. -
streetpeace - 31.01.2014
It works great! Thanks you very much! +rep
Re: Y_INI Problem. -
streetpeace - 01.02.2014
Don't work InGame, there aren't the name and her reason, i don't know why.
Re: Y_INI Problem. -
ProjectMan - 01.02.2014
pawn Код:
COMMAND:ban(playerid, params[])
{
new id, string[268], raison[268];
if(sscanf(params, "us[268]", id, raison)) return SendClientMessage(playerid, COLOR_GREY, "Usage: /ban [id] [raison]");
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_GREY, "INFO : Vous n'кtes pas un administrateur.");
format(string, sizeof(string), "{8DFFFF}[ADMIN] {AA33AA}L'administrateur %s a banni dйfinitivement %s pour : %s", PlayerName(playerid), PlayerName(id), raison);
SendClientMessageToAll(-1, string);
// PARTIE DE SAVE, IMPORTANTE.
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Ban",1);
INI_WriteInt(File,"NomAdmin",PlayerName(playerid));
INI_WriteString(File,"RaisonBan",raison);
INI_Close(File);
SetTimerEx("Kicking", 1000, 0, "i", playerid);
return 1;
}
Re: Y_INI Problem. -
Burridge - 01.02.2014
@ProjectMan Why are you writing the name using WriteInt? The name isn't an integer!
Re: Y_INI Problem. -
streetpeace - 03.02.2014
Lol!
Now, he is not saving the ban + the reason and administrator name..
the other command, is saving the ban only but not the name and reason! Help