17.11.2018, 10:16
Code:
\\SERVER\Millennial Roleplay\gamemodes\MRP.pwn(11881) : error 033: array must be indexed (variable "ChemicalOffer") \\SERVER\Millennial Roleplay\gamemodes\MRP.pwn(11882) : error 033: array must be indexed (variable "ChemicalPrice") \\SERVER\Millennial Roleplay\gamemodes\MRP.pwn(11884) : error 035: argument type mismatch (argument 1) \\SERVER\Millennial Roleplay\gamemodes\MRP.pwn(11885) : error 033: array must be indexed (variable "ChemicalOffer") \\SERVER\Millennial Roleplay\gamemodes\MRP.pwn(11892) : error 035: argument type mismatch (argument 1) \\SERVER\Millennial Roleplay\gamemodes\MRP.pwn(11896) : error 033: array must be indexed (variable "ChemicalOffer") \\SERVER\Millennial Roleplay\gamemodes\MRP.pwn(11896) : error 033: array must be indexed (variable "ChemicalPrice") \\SERVER\Millennial Roleplay\gamemodes\MRP.pwn(11897) : error 033: array must be indexed (variable "ChemicalOffer") \\SERVER\Millennial Roleplay\gamemodes\MRP.pwn(11898) : error 035: argument type mismatch (argument 1) \\SERVER\Millennial Roleplay\gamemodes\MRP.pwn(11902) : error 033: array must be indexed (variable "ChemicalPrice") \\SERVER\Millennial Roleplay\gamemodes\MRP.pwn(11903) : error 033: array must be indexed (variable "ChemicalOffer") \\SERVER\Millennial Roleplay\gamemodes\MRP.pwn(11903) : error 033: array must be indexed (variable "ChemicalPrice") \\SERVER\Millennial Roleplay\gamemodes\MRP.pwn(11904) : error 035: argument type mismatch (argument 1) \\SERVER\Millennial Roleplay\gamemodes\MRP.pwn(11909) : error 035: argument type mismatch (argument 1) \\SERVER\Millennial Roleplay\gamemodes\MRP.pwn(11928) : error 033: array must be indexed (variable "ChemicalGram") \\SERVER\Millennial Roleplay\gamemodes\MRP.pwn(11929) : error 033: array must be indexed (variable "ChemicalOffer") \\SERVER\Millennial Roleplay\gamemodes\MRP.pwn(11929) : error 033: array must be indexed (variable "ChemicalGram") \\SERVER\Millennial Roleplay\gamemodes\MRP.pwn(11930) : error 033: array must be indexed (variable "ChemicalOffer") \\SERVER\Millennial Roleplay\gamemodes\MRP.pwn(11931) : error 035: argument type mismatch (argument 1) \\SERVER\Millennial Roleplay\gamemodes\MRP.pwn(11932) : error 033: array must be indexed (variable "ChemicalOffer") \\SERVER\Millennial Roleplay\gamemodes\MRP.pwn(11933) : error 035: argument type mismatch (argument 1) \\SERVER\Millennial Roleplay\gamemodes\MRP.pwn(11934) : error 033: array must be indexed (variable "ChemicalOffer") \\SERVER\Millennial Roleplay\gamemodes\MRP.pwn(11935) : error 035: argument type mismatch (argument 1) \\SERVER\Millennial Roleplay\gamemodes\MRP.pwn(11936) : error 033: array must be indexed (variable "ChemicalOffer") \\SERVER\Millennial Roleplay\gamemodes\MRP.pwn(11937) : error 035: argument type mismatch (argument 1) \\SERVER\Millennial Roleplay\gamemodes\MRP.pwn(11938) : error 033: array must be indexed (variable "ChemicalOffer") Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 26 Errors.
Code:
else if(strcmp(params,"chems",true) == 0) { if(ChemicalOffer[playerid] < 999) { if(GetPlayerCash(playerid) > ChemicalPrice[playerid]) { if(PlayerInfo[playerid][pChemical] < 25) { if(IsPlayerConnected(ChemicalOffer[playerid])) { if(PlayerInfo[ChemicalOffer[playerid]][pChemical] < ChemicalGram[playerid]) { SendClientMessage(playerid,COLOR_GREY, "That player does not have that amount of chemical anymore!"); return 1; } new ip[32], ipex[32]; GetPlayerIp(playerid, ip, sizeof(ip)); GetPlayerIp(ChemicalOffer[playerid], ipex, sizeof(ipex)); //format(string, sizeof(string), "[CRACK DEAL (%d GRAMS)] %s (IP:%s) has paid $%d to %s (IP:%s)", CrackGram[playerid], GetPlayerNameEx(playerid), ip, CrackPrice[playerid], GetPlayerNameEx(CrackOffer[playerid]), ipex); // Log("logs/pay.log", string); ChemicalWarn[playerid][ChemicalOffer[playerid]] += ChemicalPrice[playerid]; if(ChemicalWarn[playerid][ChemicalOffer[playerid]] >= 2500 && (PlayerInfo[ChemicalOffer[playerid]][pLevel] <= 3 || PlayerInfo[ChemicalOffer[playerid]][pLevel] <= 3)) { format(string, sizeof(string), "%s (IP:%s) has sold %s (IP:%s) $%d of chemical in this session.", GetPlayerNameEx(ChemicalOffer[playerid]), ipex, GetPlayerNameEx(playerid), ip, ChemicalWarn[playerid][ChemicalOffer[playerid]]); ABroadCast(COLOR_YELLOW, string, 1); } GivePlayerCash(playerid, -ChemicalPrice[playerid]); GivePlayerCash(ChemicalOffer[playerid], ChemicalPrice[playerid]); GetPlayerName(ChemicalOffer[playerid], giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* You bought %d ounce(s) for $%d from Drug Dealer %s.",ChemicalGram[playerid],ChemicalPrice[playerid],giveplayer); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* %s has bought your %d ounce(s), the $%d was added to your money.",sendername,ChemicalGram[playerid],ChemicalPrice[playerid]); SendClientMessage(ChemicalOffer[playerid], COLOR_LIGHTBLUE, string); #if defined DOUBLE_EXP_ENABLED new hour,minuite,second; gettime(hour,minuite,second); if(DoubleEXPcheck(hour)) { PlayerInfo[ChemicalOffer[playerid]][pDrugsSkill] += 2; SendClientMessage(ChemicalOffer[playerid], COLOR_YELLOW, "* You have gained two skill points for this job due to double experience."); } else { SendClientMessage(ChemicalOffer[playerid], COLOR_YELLOW, "* You have only gained one skill point for this job since it's not within the double experience hours."); PlayerInfo[ChemicalOffer[playerid]][pDrugsSkill]++; } #else PlayerInfo[ChemicalOffer[playerid]][pDrugsSkill]++; #endif PlayerInfo[playerid][pChemical] += ChemicalGram[playerid]; PlayerInfo[ChemicalOffer[playerid]][pChemical] -= ChemicalGram[playerid]; if(PlayerInfo[ChemicalOffer[playerid]][pDrugsSkill] == 50) { SendClientMessage(ChemicalOffer[playerid], COLOR_YELLOW, "* Your Drug Dealer Skill is now Level 2, you can buy more ounces and cheaper."); } else if(PlayerInfo[ChemicalOffer[playerid]][pDrugsSkill] == 100) { SendClientMessage(ChemicalOffer[playerid], COLOR_YELLOW, "* Your Drug Dealer Skill is now Level 3, you can buy more ounces and cheaper."); } else if(PlayerInfo[ChemicalOffer[playerid]][pDrugsSkill] == 200) { SendClientMessage(ChemicalOffer[playerid], COLOR_YELLOW, "* Your Drug Dealer Skill is now Level 4, you can buy more ounces and cheaper."); } else if(PlayerInfo[ChemicalOffer[playerid]][pDrugsSkill] == 400) { SendClientMessage(ChemicalOffer[playerid], COLOR_YELLOW, "* Your Drug Dealer Skill is now Level 5, you can buy more ounces and cheaper."); } ChemicalOffer[playerid] = 999; ChemicalPrice[playerid] = 0; ChemicalGram[playerid] = 0; return 1; } return 1; } else { SendClientMessage(playerid, COLOR_GREY, " You're fully loaded with Chemical, use them first!"); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, " You can't afford that Chemical!"); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, " No-one offered you any Chemical!"); return 1; } }