Marker? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Marker? (
/showthread.php?tid=586341)
Marker? -
alexanderjb918 - 21.08.2015
Код:
C:\Users\ii\Desktop\New Folder (7)\gamemodes\dnrp.pwn(8132) : error 029: invalid expression, assumed zero
Код:
stock UpdateHouseText(houseid)
{
if(HouseInfo[houseid][hOwned] == 0)
CreateDynamicMapIcon(HouseInfo[hInfo][hEntranceX], HouseInfo[hInfo][hEntranceY], HouseInfo[hInfo][hEntranceZ], 31, 1, -1, -1, -1, 100.0);
format(msg, sizeof(msg), "House: %d\n%s\nPrice: $%d\nLevel: %d", houseid, HouseInfo[houseid][hInfo], HouseInfo[houseid][hPrice], HouseInfo[houseid][hLevelbuy]);
else
format(msg, sizeof(msg), "House: %d\n%s", houseid, HouseInfo[houseid][hInfo]);
UpdateDynamic3DTextLabelText(Text3D:HouseInfo[houseid][hLabel], -1, msg);
return 1;
}
Re: Marker? -
Nephxes - 21.08.2015
I think you don't even know what this code do. You need to create map icon when you create house and update it to another map icon, if you want, when you update label.
Re: Marker? -
alexanderjb918 - 21.08.2015
Updated with error's
Re: Marker? -
Nephxes - 21.08.2015
Change:
Код:
CreateDynamicMapIcon(HouseInfo[hInfo][hEntranceX], HouseInfo[hInfo][hEntranceY], HouseInfo[hInfo][hEntranceZ], 31, 1, -1, -1, -1, 100.0);
To:
Код:
CreateDynamicMapIcon(HouseInfo[houseid][hEntranceX], HouseInfo[houseid][hEntranceY], HouseInfo[houseid][hEntranceZ], 31, 1, -1, -1, -1, 100.0);
Re: Marker? -
alexanderjb918 - 21.08.2015
Still the same error.
Re: Marker? -
Nephxes - 21.08.2015
The error is in this line for sure? Show me enum handled to
HouseInfo.
Re: Marker? -
alexanderjb918 - 21.08.2015
enum HOUSE_INFO
{
hID,
Text3D:hLabel,
hCheckPoint,
Float:hEntranceX,
Float:hEntranceY,
Float:hEntranceZ,
Float:hExitX,
Float:hExitY,
Float:hExitZ,
hInfo[128],
hOwner[MAX_PLAYER_NAME],
hOwned,
hLocked,
hPrice,
hLevelbuy,
hRentprice,
hRentable,
hInterior,
hWorld,
hCash,
hFurnitures,
hWeapon[10],
hAmmo[10],
hHouseOn,
Float:hCheckPosX,
Float:hCheckPosY,
Float:hCheckPosZ,
hRadio,
hRadioOn,
hMapIcon,
hPickupID,
hRadioURL[256]
};
new HouseInfo[MAX_HOUSES][HOUSE_INFO];
Re: Marker? -
Evocator - 21.08.2015
Код:
stock UpdateHouseText(houseid)
{
if(!HouseInfo[houseid][hOwned])
{
CreateDynamicMapIcon(HouseInfo[hInfo][hEntranceX], HouseInfo[hInfo][hEntranceY], HouseInfo[hInfo][hEntranceZ], 31, 1, -1, -1, -1, 100.0);
format(msg, sizeof(msg), "House: %d\n%s\nPrice: $%d\nLevel: %d", houseid, HouseInfo[houseid][hInfo], HouseInfo[houseid][hPrice], HouseInfo[houseid][hLevelbuy]);
}
else
{
format(msg, sizeof(msg), "House: %d\n%s", houseid, HouseInfo[houseid][hInfo]);
}
UpdateDynamic3DTextLabelText(Text3D:HouseInfo[houseid][hLabel], -1, msg);
return 1;
}
Re: Marker? -
Nephxes - 21.08.2015
Didn't see post above.