got this error on this line:
const int restricted_weapons[] = { WEAPON_AK47, WEAPON_AWP, WEAPON_M4A4 };"
By the way this is SourcePawn i thought about something but it did not work
got this error on this line:
const int restricted_weapons[] = { WEAPON_AK47, WEAPON_AWP, WEAPON_M4A4 };"
By the way this is SourcePawn i thought about something but it did not work
Remove the
const.If the dimension of the array is known at compile time (seems to be the case in your example), add the dimension in between the brackets.
int restricted_weapons[3] = { WEAPON_AK47, WEAPON_AWP, WEAPON_M4A4 };if the dimension is not known, use the new keyword:
int[] array = new int[size];