SA-MP Forums Archive
Loadmailboxes Error - 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: Loadmailboxes Error (/showthread.php?tid=517661)



Loadmailboxes Error - boysockpr0123 - 06.06.2014

How can i fix with this error ? Plz help
Код:
error 028: invalid subscript (not an array or too many subscripts): "mbInfo"
warning 215: expression has no effect
error 001: expected token: ";", but found "]"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
Line Script ERROR :22623(The first Line)
Код:
                      mbInfo[iIndex][mbVW] = floatstr(arrCoords[0]);
				mbInfo[iIndex][mbInt] = floatstr(arrCoords[1]);
				mbInfo[iIndex][mbModel] = floatstr(arrCoords[2]);
				mbInfo[iIndex][mbPosX] = floatstr(arrCoords[3]);
				mbInfo[iIndex][mbPosY] = floatstr(arrCoords[4]);
				mbInfo[iIndex][mbPosZ] = floatstr(arrCoords[5]);
				mbInfo[iIndex][mbAngle] = floatstr(arrCoords[6]);



Re: Loadmailboxes Error - RenovanZ - 06.06.2014

Post your mbInfo enum.


Re: Loadmailboxes Error - boysockpr0123 - 06.06.2014

Quote:
Originally Posted by RenovanZ
Посмотреть сообщение
Post your mbInfo enum.
Код:
enum mbInfo
{
	mbVW,
	mbInt,
	mbModel,
	Float: mbPosX,
	Float: mbPosY,
	Float: mbPosZ,
	Float: mbAngle,
	mbObjectId,
	Text3D: mbTextId
}
new MailBoxes[MAX_MAILBOXES][mbInfo];



Re: Loadmailboxes Error - RenovanZ - 06.06.2014

Your enum isn't string, so you should not use floatstr. Try this:
Код:
                      mbInfo[iIndex][mbVW] = floatround(arrCoords[0], floatround_round);
				mbInfo[iIndex][mbInt] = floatround(arrCoords[1], floatround_round);
				mbInfo[iIndex][mbModel] = floatround(arrCoords[2], floatround_round);
				mbInfo[iIndex][mbPosX] = arrCoords[3];
				mbInfo[iIndex][mbPosY] = arrCoords[4];
				mbInfo[iIndex][mbPosZ] = arrCoords[5];
				mbInfo[iIndex][mbAngle] = arrCoords[6];



Re: Loadmailboxes Error - boysockpr0123 - 06.06.2014

Quote:
Originally Posted by RenovanZ
Посмотреть сообщение
Your enum isn't string, so you should not use floatstr. Try this:
Код:
                      mbInfo[iIndex][mbVW] = floatround(arrCoords[0], floatround_round);
				mbInfo[iIndex][mbInt] = floatround(arrCoords[1], floatround_round);
				mbInfo[iIndex][mbModel] = floatround(arrCoords[2], floatround_round);
				mbInfo[iIndex][mbPosX] = arrCoords[3];
				mbInfo[iIndex][mbPosY] = arrCoords[4];
				mbInfo[iIndex][mbPosZ] = arrCoords[5];
				mbInfo[iIndex][mbAngle] = arrCoords[6];
It's not work for me , tks for helping