Код:
Undefined symbol "i"
new bizkey = PlayerInfo[i][pPbiskey];
public ExtortionBiz(bizid, money)
{
new string[128];
format(string, sizeof(string), "Nobody");
if(strcmp(BizzInfo[bizid][bExtortion],string, true ) == 0 )
{
return 0;
}
for(new i = 0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
new name[MAX_PLAYER_NAME];
new wstring[MAX_PLAYER_NAME];
GetPlayerName(i, name, sizeof(name));
format(string, sizeof(string), "%s", name);
strmid(wstring, string, 0, strlen(string), 255);
if(strcmp(BizzInfo[bizid][bExtortion] ,wstring, true ) == 0 )
{
new value = money / 100;
value = value * 10;
GivePlayerMoney(i, value);
BizzInfo[bizid][bTill] -= value;
}
}
}
return 1;
}
forward FillingBizz(playerid);
public FillingBizz(playerid)
{
new string[128];
new h = PlayerInfo[playerid][pPbiskey];
if(PlayerInfo[playerid][pPbiskey] >= 1)
{
BizzInfo[h][bProducts] += BizzInfo[h][bDelivProd];
BizzInfo[h][bTill] -= BizzInfo[h][bPriceProd];
format(string, sizeof(string), "Your business received %d products for $%d.", BizzInfo[h][bDelivProd],BizzInfo[h][bPriceProd]);
SendClientMessage(playerid, COLOR_LIGHTGREEN, string);
SaveBusiness(h);
}
}
public OnPropUpdate()
{
new idx;
new File: file2;
while (idx < sizeof(BizzInfo))
{
new coordsstring[256];
format(coordsstring, sizeof(coordsstring), "%d|%d|%s|%s|%s|%f|%f|%f|%f|%f|%f|%d|%d|%d|%d|%d|%d|%d|%d|%d\n",
BizzInfo[idx][bOwned],
BizzInfo[idx][bRadio],
BizzInfo[idx][bOwner],
BizzInfo[idx][bMessage],
BizzInfo[idx][bExtortion],
BizzInfo[idx][bEntranceX],
BizzInfo[idx][bEntranceY],
BizzInfo[idx][bEntranceZ],
BizzInfo[idx][bExitX],
BizzInfo[idx][bExitY],
BizzInfo[idx][bExitZ],
BizzInfo[idx][bLevelNeeded],
BizzInfo[idx][bBuyPrice],
BizzInfo[idx][bEntranceCost],
BizzInfo[idx][bTill],
BizzInfo[idx][bLocked],
BizzInfo[idx][bInterior],
BizzInfo[idx][bProducts],
BizzInfo[idx][bMaxProducts],
BizzInfo[idx][bPriceProd]);
if(idx == 0)
{
file2 = fopen("bizz.cfg", io_write);
}
else
{
file2 = fopen("bizz.cfg", io_append);
}
fwrite(file2, coordsstring);
idx++;
fclose(file2);
}
return 1;
}
public PrintBizInfo(playerid,targetid)
{
if(IsPlayerConnected(playerid))
{
new coordsstring[128];
new lock[128];
new businesstype[128];
if(BizzInfo[targetid][bType] == 1)
{
businesstype = "24-7";
}
else if(BizzInfo[targetid][bType] == 2)
{
businesstype = "Clothes Store";
}
else if(BizzInfo[targetid][bType] == 3)
{
businesstype = "Club";
}
else if(BizzInfo[targetid][bType] == 4)
{
businesstype = "Ammunation";
}
else if(BizzInfo[targetid][bType] == 5)
{
businesstype = "Casino";
}
else if(BizzInfo[targetid][bType] == 6)
{
businesstype = "Restaurant";
}
else if(BizzInfo[targetid][bType] == 7)
{
businesstype = "Paintball";
}
else if(BizzInfo[targetid][bType] == 8)
{
businesstype = "Bank";
}
else if(BizzInfo[targetid][bType] == 9)
{
businesstype = "Electronic Store";
}
else if(BizzInfo[targetid][bType] == 10)
{
businesstype = "Locks Store";
}
else if(BizzInfo[targetid][bType] == 11)
{
businesstype = "Radio Shop";
}
if(BizzInfo[targetid][bLocked] == 1)
{
lock = "Yes";
}
else
{
lock = "No";
}
if(BizzInfo[targetid][bType] == 1)
{
SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
format(coordsstring, sizeof(coordsstring),"*** %s ***",BizzInfo[targetid][bMessage]);
SendClientMessage(playerid, COLOR_WHITE,coordsstring);
format(coordsstring, sizeof(coordsstring), "[%s] | Locked: [%s] | Entrance Fee: [$%d] | Bank: [$%d]", businesstype, lock, BizzInfo[targetid][bEntranceCost], BizzInfo[targetid][bTill]);
SendClientMessage(playerid, COLOR_GRAD1,coordsstring);
format(coordsstring, sizeof(coordsstring), "Products: [%d]", BizzInfo[targetid][bProducts]);
SendClientMessage(playerid, COLOR_GRAD2,coordsstring);
SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
}
else if(BizzInfo[targetid][bType] == 2)
{
SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
format(coordsstring, sizeof(coordsstring),"*** %s ***",BizzInfo[targetid][bMessage]);
SendClientMessage(playerid, COLOR_WHITE,coordsstring);
format(coordsstring, sizeof(coordsstring), "[%s] | Locked: [%s] | Entrance Fee: [$%d] | Bank: [$%d]", businesstype, lock, BizzInfo[targetid][bEntranceCost], BizzInfo[targetid][bTill]);
SendClientMessage(playerid, COLOR_GRAD1,coordsstring);
format(coordsstring, sizeof(coordsstring), "Products: [%d]", BizzInfo[targetid][bProducts]);
SendClientMessage(playerid, COLOR_GRAD2,coordsstring);
SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
}
else if(BizzInfo[targetid][bType] == 3)
{
SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
format(coordsstring, sizeof(coordsstring),"*** %s ***",BizzInfo[targetid][bMessage]);
SendClientMessage(playerid, COLOR_WHITE,coordsstring);
format(coordsstring, sizeof(coordsstring), "[%s] | Locked: [%s] | Entrance Fee: [$%d] | Bank: [$%d]", businesstype, lock, BizzInfo[targetid][bEntranceCost], BizzInfo[targetid][bTill]);
SendClientMessage(playerid, COLOR_GRAD1,coordsstring);
format(coordsstring, sizeof(coordsstring), "Products: [%d]", BizzInfo[targetid][bProducts]);
SendClientMessage(playerid, COLOR_GRAD2,coordsstring);
SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
}
else if(BizzInfo[targetid][bType] == 4)
{
SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
format(coordsstring, sizeof(coordsstring),"*** %s ***",BizzInfo[targetid][bMessage]);
SendClientMessage(playerid, COLOR_WHITE,coordsstring);
format(coordsstring, sizeof(coordsstring), "[%s] | Locked: [%s] | Entrance Fee: [$%d] | Bank: [$%d]", businesstype, lock, BizzInfo[targetid][bEntranceCost], BizzInfo[targetid][bTill]);
SendClientMessage(playerid, COLOR_GRAD1,coordsstring);
format(coordsstring, sizeof(coordsstring), "Products: [%d]", BizzInfo[targetid][bProducts]);
SendClientMessage(playerid, COLOR_GRAD2,coordsstring);
SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
}
else if(BizzInfo[targetid][bType] == 5)
{
SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
format(coordsstring, sizeof(coordsstring),"*** %s ***",BizzInfo[targetid][bMessage]);
SendClientMessage(playerid, COLOR_WHITE,coordsstring);
format(coordsstring, sizeof(coordsstring), "[%s] | Locked: [%s] | Entrance Fee: [$%d] | Bank: [$%d]", businesstype, lock, BizzInfo[targetid][bEntranceCost], BizzInfo[targetid][bTill]);
SendClientMessage(playerid, COLOR_GRAD1,coordsstring);
SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
}
else if(BizzInfo[targetid][bType] == 6)
{
SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
format(coordsstring, sizeof(coordsstring),"*** %s ***",BizzInfo[targetid][bMessage]);
SendClientMessage(playerid, COLOR_WHITE,coordsstring);
format(coordsstring, sizeof(coordsstring), "[%s] | Locked: [%s] | Entrance Fee: [$%d] | Bank: [$%d]", businesstype, lock, BizzInfo[targetid][bEntranceCost], BizzInfo[targetid][bTill]);
SendClientMessage(playerid, COLOR_GRAD1,coordsstring);
format(coordsstring, sizeof(coordsstring), "Products: [%d]", BizzInfo[targetid][bProducts]);
SendClientMessage(playerid, COLOR_GRAD2,coordsstring);
SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
}
else if(BizzInfo[targetid][bType] == 7)
{
SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
format(coordsstring, sizeof(coordsstring),"*** %s ***",BizzInfo[targetid][bMessage]);
SendClientMessage(playerid, COLOR_WHITE,coordsstring);
format(coordsstring, sizeof(coordsstring), "[%s] | Locked: [%s] | Entrance Fee: [$%d] | Bank: [$%d]", businesstype, lock, BizzInfo[targetid][bEntranceCost], BizzInfo[targetid][bTill]);
SendClientMessage(playerid, COLOR_GRAD1,coordsstring);
format(coordsstring, sizeof(coordsstring), "Products: [%d]", BizzInfo[targetid][bProducts]);
SendClientMessage(playerid, COLOR_GRAD2,coordsstring);
SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
}
else if(BizzInfo[targetid][bType] == 8)
{
SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
format(coordsstring, sizeof(coordsstring),"*** %s ***",BizzInfo[targetid][bMessage]);
SendClientMessage(playerid, COLOR_WHITE,coordsstring);
format(coordsstring, sizeof(coordsstring), "[%s] | Locked: [%s] | Entrance Fee: [$%d] | Percent: [%d] | Bank: [$%d]", businesstype, lock, BizzInfo[targetid][bEntranceCost], BizzInfo[targetid][bPercent], BizzInfo[targetid][bTill]);
SendClientMessage(playerid, COLOR_GRAD1,coordsstring);
SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
}
else if(BizzInfo[targetid][bType] == 9)
{
SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
format(coordsstring, sizeof(coordsstring),"*** %s ***",BizzInfo[targetid][bMessage]);
SendClientMessage(playerid, COLOR_WHITE,coordsstring);
format(coordsstring, sizeof(coordsstring), "[%s] | Locked: [%s] | Entrance Fee: [$%d] | Percent: [%d] | Bank: [$%d]", businesstype, lock, BizzInfo[targetid][bEntranceCost], BizzInfo[targetid][bPercent], BizzInfo[targetid][bTill]);
SendClientMessage(playerid, COLOR_GRAD1,coordsstring);
SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
}
else if(BizzInfo[targetid][bType] == 10)
{
SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
format(coordsstring, sizeof(coordsstring),"*** %s ***",BizzInfo[targetid][bMessage]);
SendClientMessage(playerid, COLOR_WHITE,coordsstring);
format(coordsstring, sizeof(coordsstring), "[%s] | Locked: [%s] | Entrance Fee: [$%d] | Percent: [%d] | Bank: [$%d]", businesstype, lock, BizzInfo[targetid][bEntranceCost], BizzInfo[targetid][bPercent], BizzInfo[targetid][bTill]);
SendClientMessage(playerid, COLOR_GRAD1,coordsstring);
SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
}
else if(BizzInfo[targetid][bType] == 11)
{
SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
format(coordsstring, sizeof(coordsstring),"*** %s ***",BizzInfo[targetid][bMessage]);
SendClientMessage(playerid, COLOR_WHITE,coordsstring);
format(coordsstring, sizeof(coordsstring), "[%s] | Locked: [%s] | Entrance Fee: [$%d] | Percent: [%d] | Bank: [$%d]", businesstype, lock, BizzInfo[targetid][bEntranceCost], BizzInfo[targetid][bPercent], BizzInfo[targetid][bTill]);
SendClientMessage(playerid, COLOR_GRAD1,coordsstring);
SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
}
}
}
Show more code. And let us know at which callback (public thingy) this is added.
EDIT the code didnt fix the "i" Any ideas there is more of it but would you like me to re edit the comment post and show u everything of it
This looks like it is not added at ANY callback at all?? That seems weird, and won't work. What are you trying to do with the line?