SA-MP Forums Archive
undefined symbol "iIndex" HELP! - 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: undefined symbol "iIndex" HELP! (/showthread.php?tid=351920)



undefined symbol "iIndex" HELP! - RalphDogg - 17.06.2012

C:\Users\Zain\Desktop\Sa-mp server\gamemodes\MyRP.pwn(52090) : error 017: undefined symbol "iIndex"
C:\Users\Zain\Desktop\Sa-mp server\gamemodes\MyRP.pwn(5213 : error 017: undefined symbol "iIndex"
C:\Users\Zain\Desktop\Sa-mp server\gamemodes\MyRP.pwn(52173) : error 017: undefined symbol "iIndex"
C:\Users\Zain\Desktop\Sa-mp server\gamemodes\MyRP.pwn(5386 : error 017: undefined symbol "iIndex"
C:\Users\Zain\Desktop\Sa-mp server\gamemodes\MyRP.pwn(53880) : error 017: undefined symbol "iIndex"
C:\Users\Zain\Desktop\Sa-mp server\gamemodes\MyRP.pwn(5388 : error 017: undefined symbol "iIndex"
C:\Users\Zain\Desktop\Sa-mp server\gamemodes\MyRP.pwn(54031) : error 017: undefined symbol "iIndex"
C:\Users\Zain\Desktop\Sa-mp server\gamemodes\MyRP.pwn(54041) : error 017: undefined symbol "iIndex"
C:\Users\Zain\Desktop\Sa-mp server\gamemodes\MyRP.pwn(54049) : error 017: undefined symbol "iIndex"

This is the coding line it is the same line for all off them.
HouseInfo[iIndex][hTextID] = CreateDynamic3DTextLabel(szFileStr, COLOR_GREEN, HouseInfo[iIndex][hExteriorX], HouseInfo[iIndex][hExteriorY], HouseInfo[iIndex][hExteriorZ]+0.5,30.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 30.0);


Re: undefined symbol "iIndex" HELP! - Kindred - 17.06.2012

Obviously iIndex is not defined. Define it.


Re: undefined symbol "iIndex" HELP! - RalphDogg - 17.06.2012

How do I define it? sorry im newbie at scripting


Re: undefined symbol "iIndex" HELP! - RalphDogg - 17.06.2012

:L does #define iIndex have to do anything with it? :S


Re: undefined symbol "iIndex" HELP! - Kindred - 17.06.2012

Is this in a command, function or something?

Show me what this is in.


Re: undefined symbol "iIndex" HELP! - RalphDogg - 17.06.2012

Its a house for sale I think

DestroyDynamicPickup(HouseInfo[houseid][hPickupID]);
DestroyDynamic3DTextLabel(HouseInfo[houseid][hTextID]);
format(string, sizeof(string), "This house is\n for sale!\n Description: %s\nCost: $%d\n Level: %d\nID: %d\nTo buy this house type /buyhouse",HouseInfo[houseid][hDescription],HouseInfo[houseid][hValue],HouseInfo[houseid][hLevel],houseid);
HouseInfo[iIndex][hTextID] = CreateDynamic3DTextLabel(szFileStr, COLOR_GREEN, HouseInfo[iIndex][hExteriorX], HouseInfo[iIndex][hExteriorY], HouseInfo[iIndex][hExteriorZ]+0.5,30.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 30.0);
HouseInfo[houseid][hPickupID] = CreateDynamicPickup(1273, 23, HouseInfo[houseid][hExteriorX], HouseInfo[houseid][hExteriorY], HouseInfo[houseid][hExteriorZ]);


Re: undefined symbol "iIndex" HELP! - Randy More - 17.06.2012

You seems to be looping through a specific variable, you should have the lines like that:

pawn Код:
for(new iIndex; iIndex < MAX_HOUSES; iIndex++)
{
     HouseInfo[iIndex][hTextID] = CreateDynamic3DTextLabel(szFileStr, COLOR_GREEN, HouseInfo[iIndex][hExteriorX]
}
So have all "HouseInfo[iIndex[..]..between the loop.


Re: undefined symbol "iIndex" HELP! - Kindred - 17.06.2012

Wait, if you have houseid in there for other things, why do you have iIndex?

If you could, show me the entire function / command it's in.

EDIT: Try what he said ^^, not paying much attention to the thread.


Re: undefined symbol "iIndex" HELP! - abubaker98 - 17.06.2012

Yea i think you're right


Re: undefined symbol "iIndex" HELP! - Kindred - 17.06.2012

Quote:
Originally Posted by abubaker98
Посмотреть сообщение
I dont really know but try to add *iINDEX* under this
enum HouseInfo
{

}

It will look like this :
enum pInfo
{
iINDEX
That makes no sense, considering the first dimension is for the houseid, and the second is for the enum itself.