Error: error 033: array must be indexed (variable "weapon1")
#1

Код:
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
Reply
#2

Understanding errors, lesson 1: Consult the wiki on how to use this function correctly: https://sampwiki.blast.hk/wiki/GetWeaponName
Reply
#3

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);
Reply
#4

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...
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)