26.03.2011, 11:25
hey sciprters
I got this variable
enum pInfo{
pUnit[32],
}
new PlayerInfo[MAX_PLAYERS][pInfo];
I got this command
so that makes the player unit anything he wants . and it is working fine .
but when I quit the game I want to save the player's unit name in dini .
So I tried to do this
dini_Set(file,"pUnit",PlayerInfo[playerid][pUnit] = "tiger2");
and it says
error 047: array sizes do not match, or destination array is too small
I got this variable
enum pInfo{
pUnit[32],
}
new PlayerInfo[MAX_PLAYERS][pInfo];
I got this command
Код:
dcmd_unitset(playerid, params[]) { new id,unit[32]; if(!sscanf(params,"us[32]",id,unit)) { if(PlayerInfo[playerid][pCop] > 5) { PlayerInfo[id][pUnit] = unit; new pName[MAX_PLAYER_NAME],victim[MAX_PLAYER_NAME]; GetPlayerName(id,victim,sizeof(victim)); GetPlayerName(playerid,pName,sizeof(pName)); new string[256]; format(string,sizeof(string),"%s has set your unit name to %s",pName,unit); SendClientMessage(id,COLOR_ADMINS,string); format(string,sizeof(string),"You have set %s's unit name to %s.",victim,unit); SendClientMessage(playerid,COLOR_ADMINS,string); }else return SendClientMessage(playerid,COLOR_AFOR,"Your rank doesnt allow you to use this tool !"); }else return SendClientMessage(playerid,COLOR_RED,"Usage : /unitset [PLAYERID][UNITNAME]"); return 1; }
but when I quit the game I want to save the player's unit name in dini .
So I tried to do this
dini_Set(file,"pUnit",PlayerInfo[playerid][pUnit] = "tiger2");
and it says
error 047: array sizes do not match, or destination array is too small