The thing with menu_additem is that all the values are saved behind the scenes in the form of bytes instead of cells (4 bytes).
If signed that means -128 to 127, and unsigned 0 to 255. PAWN doesn't have unsigned values.
You either lower the price, bit shift the value into multiple cells or convert it to a string.
I prefer the bitshifting because it's a predefined size that doesn't require parsing by natives, but it is also the most complicated one.
But performance is not an issue in the case of menus, you can just make it a string. Your data variable is already 5 cells, which is enough for 4 numbers and null.
Here's how to do it with strings:
Code:
Data[0] = CONST_MENU_DATA[i][mPRICE]
-->
Code:
num_to_str(CONST_MENU_DATA[i][mPRICE], Data, charsmax(Data));
Code:
if(g_Frags[id] < Data[0])
-->
Code:
if(g_Frags[id] < str_to_num(Data))
Code:
g_Frags[id] -= Data[0]
-->
Code:
g_Frags[id] -= str_to_num(Data)
Edit:
You could also apply the same logic as done with the hitzone string message
Code:
client_print(id, print_chat, "Raz3r.- Ahora haces danio en %s", CONST_MENU_DATA[item][mHITZONE])
Since "item" will match the array enumeration, you could use that for the frags cost as well.
This would be the preferred method as it saves all the getinfo native calls.
__________________