C:\Users\HP\Desktop\uffv3\gamemodes\gamemode.pwn(95) : error 001: expected token: ";", but found "-identifier-" C:\Users\HP\Desktop\uffv3\gamemodes\gamemode.pwn(95) : error 017: undefined symbol "PropBuyPrice" C:\Users\HP\Desktop\uffv3\gamemodes\gamemode.pwn(95) : warning 215: expression has no effect C:\Users\HP\Desktop\uffv3\gamemodes\gamemode.pwn(95) : error 001: expected token: ";", but found "]" C:\Users\HP\Desktop\uffv3\gamemodes\gamemode.pwn(95) : fatal error 107: too many error messages on one line
{
new PropNome [20] PropBuyPrice, PropSellPrice, PropLucre, PropOwner[MAX_PLAYER_NAME] Float: PosX_Prop, Float: PosY_Prop, Float: PosZ_Prop;
if(sscanf(params, "iiis[24]s[20]", PropBuyPrice, PropSellPrice, PropLucre, PropOwner, PropNome)) return SendClientMessage(playerid, -1, "/ PCRIAR [&COST] [&SALE] [&LUCRE] [&OWNER(DEFAULT: 'N/A')] [&NAME] ");
if(PropNameExists(PropNome) == true) return SendClientMessage(playerid, -1, "The name of this property already exists.");
PropOwner[MAX_PLAYER_NAME] Float: PosX_Prop,
Код:
PropOwner[MAX_PLAYER_NAME] Float: PosX_Prop, |
C:\Users\HP\Desktop\uffv3\gamemodes\gm.pwn(434) : warning 208: function with tag result used before definition, forcing reparse C:\Users\HP\Desktop\uffv3\gamemodes\gm.pwn(463) : warning 208: function with tag result used before definition, forcing reparse C:\Users\HP\Desktop\uffv3\gamemodes\gm.pwn(478) : warning 208: function with tag result used before definition, forcing reparse C:\Users\HP\Desktop\uffv3\gamemodes\gm.pwn(500) : warning 208: function with tag result used before definition, forcing reparse C:\Users\HP\Desktop\uffv3\gamemodes\gm.pwn(96) : error 017: undefined symbol "sscanf" C:\Users\HP\Desktop\uffv3\gamemodes\gm.pwn(251) : error 017: undefined symbol "Price_SELL_PROP" C:\Users\HP\Desktop\uffv3\gamemodes\gm.pwn(433) : error 010: invalid function or declaration C:\Users\HP\Desktop\uffv3\gamemodes\gm(448) : error 010: invalid function or declaration C:\Users\HP\Desktop\uffv3\gamemodes\gm.pwn(449) : error 025: function heading differs from prototype C:\Users\HP\Desktop\uffv3\gamemodes\gm.pwn(477) : error 010: invalid function or declaration C:\Users\HP\Desktop\uffv3\gamemodes\gm.pwn(499) : error 010: invalid function or declaration
CMD:pcreate(playerid, params[]) { new PropNome [20], PropBuyPrice, PropSellPrice, PropLucre, PropOwner[MAX_PLAYER_NAME], Float: PosX_Prop, Float: PosY_Prop, Float: PosZ_Prop; if(sscanf(params, "iiis[24]s[20]", PropBuyPrice, PropSellPrice, PropLucre, PropOwner, PropNome)) return SendClientMessage(playerid, -1, "/ PCRIAR [&COST] [&SALE] [&LUCRE] [&OWNER(DEFAULT: 'N/A')] [&NAME] "); if(PropNameExists(PropNome) == true) return SendClientMessage(playerid, -1, "The name of this property already exists."); if(PropBuyPrice < 100 || PropBuyPrice > 99999999) return SendClientMessage(playerid, -1, "The cost of property must be between 100-99999999"); if(PropSellPrice < 100 || PropSellPrice > PropBuyPrice) return SendClientMessage(playerid, -1, "The sales value of the property must be at least 100 and can not pass the cost value."); GetPlayerPos(playerid, PosX_Prop, PosY_Prop, PosZ_Prop); CreateProp(PropNome, PropBuyPrice, PropSellPrice, PropLucre, PropOwner, PosX_Prop, PosY_Prop, PosZ_Prop); return 1; }
#if DEBUG_PROP == true printf("CreateProp: ID: %i | Name: %s | Cost: R$ %i,00 | Sell: R$ %i,00 | Lucre: R$ %i,00 | Owner: %s", ID_Prop, NAME_PROP, Price_Buy_Prop, Price_SELL_PROP, LUCRE_PROP, OWNER_PROP); #endif return 1; }
stock LoadProps() { new GetID; mysql_format(MySQL_Connection, Format_MySQL, sizeof Format_MySQL, "SELECT * FROM `"TABLE_PROP"`"); mysql_query(MySQL_Connection, Format_MySQL); if(cache_num_rows()) { printf("\n____________________________PROPERTIES_SYS_BY_F1N4L____________________________"); for(new p = 0; p < cache_num_rows(); p ++) { GetID = cache_get_field_content_int(p, ID_PROP); cache_get_field_content(p, NAME_PROP, pInfoPropName[GetID]); cache_get_field_content(p, OWNER_PROP, pInfoPropOwner[GetID]); pInfoPropBuyPrice[GetID] = cache_get_field_content_int(p, COST_PROP); pInfoPropSellPrice[GetID] = cache_get_field_content_int(p, SELL_PROP); pInfoPropLucre_[GetID] = cache_get_field_content_int(p, VALOR_LUCRE_PROP); pInfoPropLucre[GetID] = cache_get_field_content_int(p, LUCRE_PROP); pInfoPropPosX[GetID] = cache_get_field_content_float(p, POSX_PROP); pInfoPropPosY[GetID] = cache_get_field_content_float(p, POSY_PROP); pInfoPropPosZ[GetID] = cache_get_field_content_float(p, POSZ_PROP); pInfoPropIdCheck[GetID] = true; pInfoPropTimeLucre[GetID] = TEMPO_Lucre * 60 + gettime(); if(strcmp("N/A", pInfoPropOwner[GetID], true) == 0) format(Format_Label, sizeof Format_Label, "ID: %i\nName: %s\nOwner: %s\nPrice: R$ %i,00\nLucre: R$ %i,00", GetID, pInfoPropName[GetID], pInfoPropOwner[GetID], pInfoPropBuyPrice[GetID], pInfoPropLucre_[GetID]); else format(Format_Label, sizeof Format_Label, "ID: %i\nName: %s\nOwner: %s\nLucre: R$ %i,00", GetID, pInfoPropName[GetID], pInfoPropOwner[GetID], pInfoPropLucre[GetID]); pInfoPickupProp[GetID] = CreatePickup(1210, 1, pInfoPropPosX[GetID], pInfoPropPosY[GetID], pInfoPropPosZ[GetID]); pInfoLabelProp[GetID] = Create3DTextLabel(Format_Label, -1, pInfoPropPosX[GetID], pInfoPropPosY[GetID], pInfoPropPosZ[GetID] + 1, 50.0, 0, 1); #if DEBUG_PROP == true printf("ID: %i | Name: %s | Owner: %s | Cost: %i | Sell: %i | Lucre: %i", GetID, pInfoPropName[GetID], pInfoPropOwner[GetID], pInfoPropBuyPrice[GetID], pInfoPropSellPrice[GetID], pInfoPropLucre[GetID]); #endif } SetTimer("LucreProp", 1000, true); #if DEBUG_PROP == true printf("\n%i Properties loaded.\n_____________________________________________________________________________\n", cache_num_rows()); #endif } return 1; } foward stock bool:IsPlayerInRangeOfProp(playerid, ID_Prop); stock bool:IsPlayerInRangeOfProp(playerid, ID_Prop) { if(pInfoPropIdCheck[ID_Prop] == false) return false; new bool:InRange; if(IsPlayerInRangeOfPoint(playerid, 5.0, pInfoPropPosX[ID_Prop], pInfoPropPosY[ID_Prop], pInfoPropPosZ[ID_Prop])) InRange = true; else InRange = false; #if DEBUG_PROP == true printf("IsPlayerInRangeOfProp: %s | Playerid: %i | Near: %i", pInfoPropName[ID_Prop], playerid, InRange); #endif return InRange; } forward stock bool:IsEmptyProp(ID_Prop); stock bool:IsEmptyProp(ID_Prop) { if(pInfoPropIdCheck[ID_Prop] == false) return false; new bool:CheckOwner; if(strcmp("N/A", pInfoPropOwner[ID_Prop], false) == 0) CheckOwner = true; else CheckOwner = false; #if DEBUG_PROP == true printf("CheckOwnerProp: %s | Exists: %i", pInfoPropName[ID_Prop], CheckOwner); #endif return CheckOwner; } stock bool:IsPlayerOwnerProp(Owner_Prop[], ID_Prop) { if(pInfoPropIdCheck[ID_Prop] == false) return false; new bool:PlayerIsOwner; if(strcmp(Owner_Prop, pInfoPropOwner[ID_Prop], false) == 0) PlayerIsOwner = true; else PlayerIsOwner = false; #if DEBUG_PROP == true printf("PlayerIsOwnerProp: %s | Owner: %s | is Owner: %i", pInfoPropName[ID_Prop], Owner_Prop, PlayerIsOwner); #endif return PlayerIsOwner; } foward stock bool:PropIdExists(ID_Prop); stock bool:PropIdExists(ID_Prop) { new bool:PropExists; for(new p = 0; p < MAX_PROPS; p ++) { if(pInfoPropIdCheck[p] == false) continue; if(pInfoPropIdCheck[ID_Prop] == true) { PropExists = true; break; } else PropExists = false; } #if DEBUG_PROP == true printf("PropExists: %s | Exists: %i", pInfoPropName[ID_Prop], PropExists); #endif return PropExists; } foward stock bool:PropNameExists(Name_Prop[]); stock bool:PropNameExists(Name_Prop[]) { new bool:PropExists; for(new p = 0; p < MAX_PROPS; p ++) { if(pInfoPropIdCheck[p] == false) continue; if(strcmp(Name_Prop, pInfoPropName[p], true) == 0) { PropExists = true; break; } else PropExists = false; } #if DEBUG_PROP == true printf("PropNameExists: %s | Exists: %i", NAME_PROP, PropExists); #endif return PropExists; } forward LucreProp(); public LucreProp() { for(new p = 0; p < MAX_PROPS; p ++) { if(pInfoPropIdCheck[p] == false) continue; if(strcmp("N/A", pInfoPropOwner[p], true) == 0) continue; if(pInfoPropTimeLucre[p] < gettime()) { pInfoPropTimeLucre[p] = TEMPO_Lucre * 60 + gettime();
#define TABLE_PROP "PROPERTIES"
#define ID_PROP "ID"
#define NAME_PROP "NAME"
#define COST_PROP "PROP COMPRA"
#define SELL_PROP "PROP Sell"
#define VALOR_LUCRE_PROP "PROP LUCRE"
#define LUCRE_PROP "LUCRE"
#define OWNER_PROP "OWNER"
#define POSX_PROP "POS X"
#define POSY_PROP "POS Y"
#define POSZ_PROP "POS Z"
#define MAX_PROPS 100
#define TEMPO_Lucre 1
#define DEBUG_PROP true
new
MySQL_Connection;
new
pInfoPropName[MAX_PROPS][20],
pInfoPropBuyPrice[MAX_PROPS],
pInfoPropSellPrice[MAX_PROPS],
pInfoPropLucre_[MAX_PROPS],
pInfoPropLucre[MAX_PROPS],
pInfoPropTimeLucre[MAX_PROPS],
pInfoPropOwner[MAX_PROPS][MAX_PLAYER_NAME],
Float:pInfoPropPosX[MAX_PROPS],
Float:pInfoPropPosY[MAX_PROPS],
Float:pInfoPropPosZ[MAX_PROPS],
bool:pInfoPropIdCheck[MAX_PROPS];
new
pInfoPickupProp[MAX_PROPS],
Text3D:pInfoLabelProp[MAX_PROPS];
new
Format_MySQL[600],
Format_Label[150],
GetPropLucre;
new PropNome[20], PropBuyPrice, PropSellPrice, PropLucre, PropOwner[MAX_PLAYER_NAME], Float: PosX_Prop, Float: PosY_Prop, Float: PosZ_Prop;
new PropNome [20] PropBuyPrice, PropSellPrice, PropLucre, PropOwner[MAX_PLAYER_NAME] Float: PosX_Prop, Float: PosY_Prop, Float: PosZ_Prop;
new PropNome[20], PropBuyPrice, PropSellPrice, PropLucre, PropOwner[MAX_PLAYER_NAME] Float: PosX_Prop, Float: PosY_Prop, Float: PosZ_Prop;