03.01.2017, 02:31
hello guys i have a problem with my pawn compiler when i add this dialog
i get this
so i am wondering if there is any problem in the dialog above thanks in advance
pawn Код:
if(dialogid == 7776)
{
if(response == 1)
{
if(listitem == 0)
{
if(IsPlayerAdmin(playerid))
{
if(IsPlayerInAnyVehicle(playerid) == 1)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be on foot in order to sell a business!");
return 1;
}
if(ClosestBiz(playerid) >= 999)
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "You are not close enough to any of the current business icons to use this command");
return 1;
}
if (strcmp(BizInfo[ClosestBiz(playerid)][owner],DEFAULT_OWNER,false) == 0)
{
format(ystring,sizeof(ystring),"This Business (%d) does not have an owner yet!",BizInfo[ClosestBiz(playerid)][name]);
SendClientMessage(playerid,COLOR_BRIGHTRED,ystring);
return 1;
}
new file[256];
format(file,sizeof(file),"/ladmin/users/%s.sav",udb_encode(BizInfo[ClosestBiz(playerid)][owner]));
if(fexist(file))
{
tempid[playerid] = IsPlayerNameOnline(BizInfo[ClosestBiz(playerid)][owner]);
if(tempid[playerid] >= 0 || tempid[playerid] <= MAX_PLAYERS)
{
strmid(BizInfo[ClosestBiz(playerid)][owner], DEFAULT_OWNER, 0, strlen(DEFAULT_OWNER), 255);
BizInfo[ClosestBiz(playerid)][bought] = 0;
BizInfo[ClosestBiz(playerid)][cashbox] = 0;
new cbmon = BizInfo[ClosestBiz(playerid)][cashbox],bmon = PlayerInfo[playerid][bank];
PlayerInfo[tempid[playerid]][bank] = cbmon+bmon;
PlayerInfo[tempid[playerid]][bowned] = 0;
PlayerInfo[tempid[playerid]][bowner] = 0;
format(ystring, sizeof(ystring), "You just sold %s's Business (%s).", PlayerInfo[tempid[playerid]][name], BizInfo[ClosestBiz(playerid)][name]);
SendClientMessage(playerid, COLOR_ORANGE, ystring);
format(ystring, sizeof(ystring), "Admin (%s) has just sold your Business (%s)! Your cashbox money was sent to your personal bank account", PlayerInfo[playerid][name],BizInfo[ClosestBiz(playerid)][name]);
SendClientMessage(tempid[playerid], COLOR_ORANGE, ystring);
new bId = ClosestBiz(playerid);
DestroyDynamicMapIcon(BizInfo[bId][ico]);
BizInfo[bId][ico] = CreateDynamicMapIcon(BizInfo[bId][xpos],BizInfo[bId][ypos],BizInfo[bId][zpos],31,250);
return 1;
}
else
{
ResetOfflinePlayerFileB(file, ClosestBiz(playerid));
format(ystring, sizeof(ystring), "You just sold %s's Business (%s).", PlayerInfo[tempid[playerid]][name], BizInfo[ClosestBiz(playerid)][name]);
SendClientMessage(playerid, COLOR_ORANGE, ystring);
return 1;
}
}
if(!fexist(file))
{
format(ystring, sizeof(ystring), "You just sold %s's Business (%s). The player file was not found and cannot be altered.", PlayerInfo[tempid[playerid]][name], BizInfo[ClosestBiz(playerid)][name]);
SendClientMessage(playerid, COLOR_GREEN, ystring);
strmid(BizInfo[ClosestBiz(playerid)][owner], DEFAULT_OWNER, 0, strlen(DEFAULT_OWNER), 255);
BizInfo[ClosestBiz(playerid)][bought] = 0;
BizInfo[ClosestBiz(playerid)][cashbox] = 0;
new bId = ClosestBiz(playerid);
DestroyDynamicMapIcon(BizInfo[bId][ico]);
BizInfo[bId][ico] = CreateDynamicMapIcon(BizInfo[bId][xpos],BizInfo[bId][ypos],BizInfo[bId][zpos],31,250);
return 1;
}
}
else return ShowPlayerDialog(playerid, 90321, DIALOG_STYLE_MSGBOX, "{FF0000}SFTDM - ERROR MSG", RconMSG,"OK","");
}
if(listitem == 1)
{
if(IsPlayerAdmin(playerid))
{
aresetallbiz();
fremove(B_FILE_SAVE);
LoadBusinesses();
SendClientMessageToAll(COLOR_ORANGE, "All Businesses Have Been Reset.");
}
else return ShowPlayerDialog(playerid, 90321, DIALOG_STYLE_MSGBOX, "{FF0000}SFTDM - ERROR MSG", RconMSG,"OK","");
}
}
}
pawn Код:
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
Header size: 20820 bytes
Code size: 1631888 bytes
Data size: 6786800 bytes
Stack/heap size: 2227968 bytes; estimated max. usage: unknown, due to recursion
Total requirements:10667476 bytes