08.03.2010, 04:22
Hello, I'm Facu.
Since I started with Dini 1.6 I've been having problems, but not errors, my gamemode is clean of warnings and errors but sometimes, when I tell the gamemode to save something into a player's dini file, it just doesn't. I will show you.
So, lets see.
Old (example): Facuarg.ini file:
Password=1231231123
Admin=0
New Facuarg.ini file: (after the /setadmin on Facuarg)
Password=1231231123
Admin=0
Nothing changed! My dini is not just failing at this command, it's failing in a lot of functions and I really really need help with this. Am I doing it wrong? I must be doing it wrong. I just can't figure out how to do it right.
An other command that's failing too:
The codes are not well aliniated so I will upload an image of the first code.

Thanks you very much.
Since I started with Dini 1.6 I've been having problems, but not errors, my gamemode is clean of warnings and errors but sometimes, when I tell the gamemode to save something into a player's dini file, it just doesn't. I will show you.
Код:
if (strcmp(cmd, "/setadmin",true)==0) { new player[MAX_PLAYER_NAME]; if(IsPlayerAdmin(playerid)) { cmd = strtok(cmdtext, idx); new tmp[256]; new giveplayer[MAX_PLAYER_NAME]; new giveplayerid; //new playername[MAX_PLAYER_NAME]; new string[256]; tmp = strtok(cmdtext, idx); if(!strlen(tmp)) return SendClientMessage(playerid, color_rojo_03, "|| Try [/setadmin] [playerid] [level]"); new level = strval(tmp); if(giveplayerid == INVALID_PLAYER_ID) return SendClientMessage(playerid, color_rojo_03, "|| El ID introducido es invбlido."); GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, player, sizeof(player)); PlayerInfo[giveplayerid][pAdmin] = level; printf("|||||| [ADMIN] %s hiso a %s administrador nivel %d. ||||||", player, giveplayer, level); format(string, sizeof(string), "|| Admin %s seted your admin level to %d.",player, level); SendClientMessage(giveplayerid, color_aqua, string); format(string, sizeof(string), "|| You have asigned %s the %d administration level.", giveplayer, PlayerInfo[giveplayerid][pAdmin]); SendClientMessage(playerid, color_aqua, string); return 1; } else { SendClientMessage(playerid, color_rojo_03," You are not logged in on RCON."); }
Old (example): Facuarg.ini file:
Password=1231231123
Admin=0
New Facuarg.ini file: (after the /setadmin on Facuarg)
Password=1231231123
Admin=0
Nothing changed! My dini is not just failing at this command, it's failing in a lot of functions and I really really need help with this. Am I doing it wrong? I must be doing it wrong. I just can't figure out how to do it right.
An other command that's failing too:
Код:
if (strcmp(cmd, "/setleader",true)==0) { new player[MAX_PLAYER_NAME]; if(IsPlayerAdmin(playerid)) { cmd = strtok(cmdtext, idx); new tmp[256]; new giveplayer[MAX_PLAYER_NAME]; new giveplayerid; //new playername[MAX_PLAYER_NAME]; new string[256]; tmp = strtok(cmdtext, idx); if(!strlen(tmp)) return SendClientMessage(playerid, color_rojo_03, "|| trye [/setleader] [playerid] [faction]."); new level = strval(tmp); if(giveplayerid == INVALID_PLAYER_ID) return SendClientMessage(playerid, color_rojo_03, "|| Wrong ID"); GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, player, sizeof(player)); PlayerInfo[giveplayerid][pLider] = level; printf("|||||| [ADMIN] %s hiso a %s lнder de la facciуn %d. ||||||", player, giveplayer, level); format(string, sizeof(string), "|| Admin %s has made you leader of faction number %d.",player, level); SendClientMessage(giveplayerid, color_aqua, string); format(string, sizeof(string), "|| You have asigned %s the faction number %d leadership.", giveplayer, PlayerInfo[giveplayerid][pLeader]); SendClientMessage(playerid, color_aqua, string); return 1; }

Thanks you very much.