12.05.2017, 10:30
PHP код:
pData[playerid][Cookies] += Max;
Код:
warning 213: tag mismatch
pData[playerid][Cookies] += Max;
warning 213: tag mismatch
enum DATAX //We name our enumerator as PDATA (which stands for PlayerDATA). You can name it however you want.
{
ID, //Will be used later to store player's ID from database so we can use it anywhere later
Password[129], //We will load player's password into this varible from database
Admin, //We will load player's admin level from database into this variable so we can use it anywhere later.
VIP, //We will load player's VIP level from database into this variable so we can use it anywhere later.
Kills,
Cookies,
Deaths,
Score,
Money,
pTotalTime,
pConnectTime,
pHours,
pMinutes,
pSeconds,
RaceWon,
//We will load player's money from database into this variable so we can use it anywhere later.
};
new pData[MAX_PLAYERS][DATAX]; //Variable that stores enumerator above
new Max, bool:created;
At this point i'd have to ask you show me the block of code where that warning appears.
|
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == me)
{
if(takenbyplayer == true) { SendClientMessage(playerid, COLOR_YELLOW, "* Sorry the hidden pickup already taken by other players"); return 1;}
new szString[128];
takenbyplayer = true;
format(szString, sizeof(szString), "* You have been found the Player hidden pickup and win %d Cookies", Max);
SendClientMessage(playerid, COLOR_GREEN, szString);
SendClientMessage(playerid, COLOR_GREEN, "* You can use your Cookies by typing /rocket");
pData[playerid][Cookies] += Max;
new test[128], szName[MAX_PLAYER_NAME];
GetPlayerName(playerid, szName, sizeof(szName));
format(test,sizeof(test),"%s has found the ZoneX Hidden pickup and won %d Cookies", GetName(playerid), Max);
new IRC[130];
format(IRC, sizeof(IRC), "0,3* %s has Found the Player Hidden Pickup won %d Cookies.",GetName(playerid),Max);
IRC_GroupSay(groupID, IRC_CHANNEL, IRC);
SetTimerEx("pgoos", 10000, false, "i", playerid);
DestroyPickup(me);
}
return 1;
}
IRCCMD:givecookies(botid, channel[], user[], host[], params[])
{
new id, aCookies;
if(IRC_IsOp(botid, channel, user))
{
if(sscanf(params, "ui", id,aCookies))
{
IRC_Say(groupID, channel, "7Usage: 1!givecoin [id] [Cookies]");
return 1;
}
if(aCookies < 1 || aCookies > 100)
{
IRC_Say(groupID, channel, "Invalid Number [from 1 to 100 Cookies]");
}
if(!IsPlayerConnected(id)) return IRC_Say(groupID, channel, "Invalid Player ID.");
{
new pname[MAX_PLAYER_NAME], bString[128];
GetPlayerName(id, pname, sizeof(pname));
format(bString, sizeof(bString), "You have given %s (ID: %d) %d Cookies.",pname, id, aCookies);
IRC_Say(groupID, channel, bString);
format(bString, sizeof(bString), "(#ZoneX) Admin %s given %s (ID: %d) %d Cookies", user, pname, id, aCookies);
SendClientMessage(id, COLOR_YELLOW, bString);
pData[id][Cookies] += aCookies;
}
}
else return IRC_Say(groupID, channel, "7Error: 1You must be OP");
return 1;
}
and every command has pData[playerid][Cookies]