Error: error 033: array must be indexed (variable "weapon1") - 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: Error: error 033: array must be indexed (variable "weapon1") (
/showthread.php?tid=288290)
Error: error 033: array must be indexed (variable "weapon1") -
Jack_Leslie - 07.10.2011
Код:
new weapon1[65], weapon2[65],weapon3[65];
pawn Код:
weapon1 = GetWeaponName(gun1, weapon1, 64);
weapon2 = GetWeaponName(gun2, weapon2, 64);
weapon3 = GetWeaponName(gun3, weapon3, 64);
Also get the error on weapon2 and 3
Re: Error: error 033: array must be indexed (variable "weapon1") -
Vince - 07.10.2011
Understanding errors, lesson 1: Consult the wiki on how to use this function correctly:
https://sampwiki.blast.hk/wiki/GetWeaponName
Re: Error: error 033: array must be indexed (variable "weapon1") -
[MWR]Blood - 07.10.2011
That's not the way GetWeaponName works... you should input the ID of the weapon you want to know the name of.
Example:
pawn Код:
GetWeaponName(26, weapon1, 64);
Re: Error: error 033: array must be indexed (variable "weapon1") -
Jack_Leslie - 07.10.2011
Quote:
Originally Posted by [MWR]Blood
That's not the way GetWeaponName works... you should input the ID of the weapon you want to know the name of.
Example:
pawn Код:
GetWeaponName(26, weapon1, 64);
|
Sorry, forgot to say I have this:
Код:
new gun1 = CarInfo[car][vGun1], gun2 = CarInfo[car][vGun2], gun3 = CarInfo[car][vGun3];
So it should work.. shouldn't it? vGun1 vGun2 vGun3 are IDs, and only weapon IDs...