04.11.2012, 20:21
I have some errors and warnings but I can't understand what's wrong.
And here is my code:
Код:
C:\Users\home\Desktop\RS-RP v3.2.5\gamemodes\Script.pwn(19780 -- 19789) : warning 213: tag mismatch C:\Users\home\Desktop\RS-RP v3.2.5\gamemodes\Script.pwn(19780 -- 19790) : warning 213: tag mismatch C:\Users\home\Desktop\RS-RP v3.2.5\gamemodes\Script.pwn(19780 -- 19791) : warning 213: tag mismatch C:\Users\home\Desktop\RS-RP v3.2.5\gamemodes\Script.pwn(57131) : warning 213: tag mismatch C:\Users\home\Desktop\RS-RP v3.2.5\gamemodes\Script.pwn(57131) : warning 213: tag mismatch C:\Users\home\Desktop\RS-RP v3.2.5\gamemodes\Script.pwn(57132) : warning 213: tag mismatch C:\Users\home\Desktop\RS-RP v3.2.5\gamemodes\Script.pwn(57143) : error 076: syntax error in the expression, or invalid function call C:\Users\home\Desktop\RS-RP v3.2.5\gamemodes\Script.pwn(57144) : warning 213: tag mismatch C:\Users\home\Desktop\RS-RP v3.2.5\gamemodes\Script.pwn(57144) : warning 213: tag mismatch C:\Users\home\Desktop\RS-RP v3.2.5\gamemodes\Script.pwn(57145) : warning 213: tag mismatch C:\Users\home\Desktop\RS-RP v3.2.5\gamemodes\Script.pwn(57145) : warning 213: tag mismatch C:\Users\home\Desktop\RS-RP v3.2.5\gamemodes\Script.pwn(57153) : error 076: syntax error in the expression, or invalid function call C:\Users\home\Desktop\RS-RP v3.2.5\gamemodes\Script.pwn(57154) : warning 213: tag mismatch C:\Users\home\Desktop\RS-RP v3.2.5\gamemodes\Script.pwn(57154) : warning 213: tag mismatch C:\Users\home\Desktop\RS-RP v3.2.5\gamemodes\Script.pwn(57155) : warning 213: tag mismatch C:\Users\home\Desktop\RS-RP v3.2.5\gamemodes\Script.pwn(57155) : warning 213: tag mismatch C:\Users\home\Desktop\RS-RP v3.2.5\gamemodes\Script.pwn(57161) : error 076: syntax error in the expression, or invalid function call C:\Users\home\Desktop\RS-RP v3.2.5\gamemodes\Script.pwn(57162) : warning 213: tag mismatch C:\Users\home\Desktop\RS-RP v3.2.5\gamemodes\Script.pwn(57162) : warning 213: tag mismatch C:\Users\home\Desktop\RS-RP v3.2.5\gamemodes\Script.pwn(57163) : warning 213: tag mismatch C:\Users\home\Desktop\RS-RP v3.2.5\gamemodes\Script.pwn(57163) : warning 213: tag mismatch C:\Users\home\Desktop\RS-RP v3.2.5\gamemodes\Script.pwn(57174) : error 076: syntax error in the expression, or invalid function call C:\Users\home\Desktop\RS-RP v3.2.5\gamemodes\Script.pwn(57189) : error 076: syntax error in the expression, or invalid function call C:\Users\home\Desktop\RS-RP v3.2.5\gamemodes\Script.pwn(91031) : warning 203: symbol is never used: "LoadBusiness" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors.
PHP код:
CMD:bedit(playerid, params[])
{
if(PlayerInfo[playerid][pAdminDuty] == 0) return SendClientMessage(playerid, -1, "You must be on Admin Duty to use this Command!");
if(PlayerInfo[playerid][pAdmin] < 1338)
{
SendClientMessageEx(playerid, COLOR_GRAD2, "You are not authorized to use that command!");
return 1;
}
new string[128], choice[32], businessid, amount;
if(sscanf(params, "s[32]dD", choice, businessid, amount))
{
SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /bedit [name] [businessid] [(Optional)amount]");
SendClientMessageEx(playerid, COLOR_GREY, "Available names: Exterior, Type, Price");
return 1;
}
if(strcmp(choice, "exterior", true) == 0)
{
GetPlayerPos(playerid, BusinessInfo[businessid][bExteriorX], BusinessInfo[businessid][bExteriorY], BusinessInfo[businessid][bExteriorZ]); // Here is 57131
GetPlayerFacingAngle(playerid, BusinessInfo[businessid][bExteriorA]); // Here is 57132
SendClientMessageEx(playerid, COLOR_WHITE, "You have changed the exterior!");
DestroyDynamicPickup(BusinessInfo[businessid][bIconID]);
SaveBusiness();
format(string, sizeof(string), "%s has edited BusinessID %d's Exterior.", GetPlayerNameEx(playerid), businessid);
Log("logs/bedit.log", string);
if(BusinessInfo[businessid][bOwned] ==0)
{
DestroyDynamicPickup(BusinessInfo[businessid][bIconID]);
DestroyDynamic3DTextLabel(BusinessInfo[businessid][bTextID]);
format(string, sizeof(string),"{33FF33}ID: {FFFFFF}%d\n{33FF33}Owner: {FFFFFF}The State\n{33FF33}Type: {FFFFFF}%s\n{33FF33}Status: {FFFFFF}For Sell\n{33FF33}Price: {FFFFFF}%d\n To buy business type /buybusiness", businessid, BusinessType, BusinessInfo[businessid][bPrice]); // Here is 57143
BusinessInfo[businessid][bTextID] = CreateDynamic3DTextLabel( string, COLOR_REALRED, BusinessInfo[businessid][bExteriorX], BusinessInfo[businessid][bExteriorY], BusinessInfo[businessid][bExteriorZ]+0.5,10.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 10.0); // Here is 57144
BusinessInfo[businessid][bIconID] = CreateDynamicPickup(1273, 23, BusinessInfo[businessid][bExteriorX], BusinessInfo[businessid][bExteriorY], BusinessInfo[businessid][bExteriorZ]); // Here is 57145
}
else
{
if(BusinessInfo[businessid][bName] == 0)
{
DestroyDynamicPickup(BusinessInfo[businessid][bIconID]);
DestroyDynamic3DTextLabel(BusinessInfo[businessid][bTextID]);
format(string, sizeof(string),"{33FF33}ID: %d\n{33FF33}Owner: {FFFFFF}%s\n{33FF33}Type: {FFFFFF}%s\n{33FF33}Status: {FFFFFF}%s",businessid, BusinessInfo[businessid][bOwner], BusinessType, BusinessStatus);
BusinessInfo[businessid][bTextID] = CreateDynamic3DTextLabel(string,COLOR_WHITE,BusinessInfo[businessid][bExteriorX], BusinessInfo[businessid][bExteriorY], BusinessInfo[businessid][bExteriorZ]+0.5,10.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 10.0); // Here is line 57154
BusinessInfo[businessid][bIconID] = CreateDynamicPickup(1273, 23, BusinessInfo[businessid][bExteriorX], BusinessInfo[businessid][bExteriorY], BusinessInfo[businessid][bExteriorZ]); // Here is Line 57155
}
else
{
DestroyDynamicPickup(BusinessInfo[businessid][bIconID]);
DestroyDynamic3DTextLabel(BusinessInfo[businessid][bTextID]);
format(string, sizeof(string), "{33FF33}ID: %d\n{33FF33}Owner: {FFFFFF}%s\n{33FF33}Name: {FFFFFF}%s\n{33FF33}Type: {FFFFFF}%s\n{33FF33}Status: {FFFFFF}%s",businessid, BusinessInfo[businessid][bOwner],BusinessInfo[businessid][bName], BusinessType, BusinessStatus); // Here is line 57161
BusinessInfo[businessid][bTextID] = CreateDynamic3DTextLabel(string,COLOR_WHITE,BusinessInfo[businessid][bExteriorX], BusinessInfo[businessid][bExteriorY], BusinessInfo[businessid][bExteriorZ]+0.5,10.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 10.0); // Here is Line 57162
BusinessInfo[businessid][bIconID] = CreateDynamicPickup(1273, 23, BusinessInfo[businessid][bExteriorX], BusinessInfo[businessid][bExteriorY], BusinessInfo[businessid][bExteriorZ]); // Here is Line 57163
}
}
}
else if(strcmp(choice, "price", true) == 0)
{
BusinessInfo[businessid][bPrice] = amount;
format(string, sizeof(string), "You have set the business price to $%d.", amount );
SendClientMessageEx(playerid, COLOR_WHITE, string);
if(BusinessInfo[businessid][bOwned] ==0)
{
format(string, sizeof(string),"{33FF33}ID: {FFFFFF}%d\n{33FF33}Owner: {FFFFFF}The State\n{33FF33}Type: {FFFFFF}%s\n{33FF33}Status: {FFFFFF}For Sell\n{33FF33}Price: {FFFFFF}%d\n To buy business type /buybusiness", businessid, BusinessType, BusinessInfo[businessid][bPrice]); // Here is line 57174
UpdateDynamic3DTextLabelText(BusinessInfo[businessid][bTextID], COLOR_WHITE, string);
}
format(string, sizeof(string), "%s has edited businessid %d's Price to $%d.", GetPlayerNameEx(playerid), amount);
Log("logs/bedit.log", string);
}
else if(strcmp(choice, "type", true) == 0)
{
if(amount < 1 || amount > 7) return SendClientMessageEx(playerid, COLOR_GREY, "Businesses are between 1 and 7.");
BusinessInfo[businessid][bType] = amount;
format(string, sizeof(string), "You have set the business type to $%d.", amount);
SendClientMessageEx(playerid, COLOR_WHITE, string);
if(BusinessInfo[businessid][bOwned] ==0)
{
format(string, sizeof(string),"{33FF33}ID: {FFFFFF}%d\n{33FF33}Owner: {FFFFFF}The State\n{33FF33}Type: {FFFFFF}%s\n{33FF33}Status: {FFFFFF}For Sell\n{33FF33}Price: {FFFFFF}%d\n To buy business type /buybusiness", businessid, BusinessType, BusinessInfo[businessid][bPrice]); // Here is line 57189
UpdateDynamic3DTextLabelText(BusinessInfo[businessid][bTextID], COLOR_WHITE, string);
}
format(string, sizeof(string), "%s has edited businessid %d's Type to %d.", GetPlayerNameEx(playerid), amount);
Log("logs/bedit.log", string);
}
SaveBusiness();
return 1;
}