02.02.2013, 14:50
So, this is my first time working with DINI. Don't say I need to use Y_INI, because IMO DINI is easier to work with.
I have made an invite command, but it gives me an when I add my orgs to it.
My cmd:
The problem is here:
Here are my errors:
As yo ucan see I have 2 errors because I tried to make it work on another cmd too. It's the same problem.
Anybody knows how to fix it? I've tried making the array larger, but that didn't work.
I have made an invite command, but it gives me an when I add my orgs to it.
My cmd:
pawn Код:
CMD:invite(playerid, params[])
{
if(PlayerInfo[playerid][pLeader] == 1)
{
new pID, message1[170];
if(sscanf(params,"u",pID)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /invite [playerid]");
if(pID == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GRAD2, "This user is not online!");
{
new jtext[50];
new file[32];
format(file,sizeof(file),"/Orgs/org%d.ini", PlayerInfo[playerid][pFamily]);
if(PlayerInfo[playerid][pFaction] == 1) { jtext = "Police Force"; }
else if(PlayerInfo[playerid][pFaction] == 2) { jtext = "Los Santos MD"; }
else if(PlayerInfo[playerid][pFaction] == 3) { jtext = "Hitman Agency"; }
else if(PlayerInfo[playerid][pFaction] == 4) { jtext = "Los Santos Government"; }
else if(PlayerInfo[playerid][pFaction] == 5) { jtext = "Whore Company"; }
else if(PlayerInfo[playerid][pFaction] == 6) { jtext = "FBI"; }
else if(PlayerInfo[playerid][pFamily] >= 1) { jtext = dini_Get(file,"Name"); }
format(message1, sizeof(message1), "%s has invited you to join the %s, (type /accept invite) to accept.", GetName(playerid), jtext);
SendClientMessage(pID, COLOR_LIGHTBLUE, message1);
format(message1,sizeof(message1), "You've invited %s to join the %s!", GetName(pID), jtext);
SendClientMessage(playerid, COLOR_LIGHTBLUE, message1);
if(PlayerInfo[playerid][pFaction] != 0)
{
PlayerInfo[pID][pInvite] = PlayerInfo[playerid][pFaction];
}
else if(PlayerInfo[playerid][pFamily] != 0)
{
PlayerInfo[pID][pFInvite] = PlayerInfo[playerid][pFamily];
}
InvitedBy[pID] = playerid;
}
}
return 1;
}
pawn Код:
else if(PlayerInfo[playerid][pFamily] >= 1) { jtext = dini_Get(file,"Name"); }
Код:
C:\Program Files\GTA San Andreas (2)\server\Basic Roleplay\gamemodes\hrp.pwn(2279) : error 047: array sizes do not match, or destination array is too small C:\Program Files\GTA San Andreas (2)\server\Basic Roleplay\gamemodes\hrp.pwn(2387) : error 047: array sizes do not match, or destination array is too small C:\Program Files\GTA San Andreas (2)\server\Basic Roleplay\gamemodes\hrp.pwn(4974) : warning 203: symbol is never used: "ret_memcpy" C:\Program Files\GTA San Andreas (2)\server\Basic Roleplay\gamemodes\hrp.pwn(961) : warning 204: symbol is assigned a value that is never used: "tajpickup" C:\Program Files\GTA San Andreas (2)\server\Basic Roleplay\gamemodes\hrp.pwn(962) : warning 204: symbol is assigned a value that is never used: "trjpickup" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors.
Anybody knows how to fix it? I've tried making the array larger, but that didn't work.