Code:
new key = str_to_num(data)
switch(key)
{
case 1, 2, 3, 4, 5, 6, 7, 8, 9:
{
g_money[id] = str_to_num(data)
}
}
How do you think that str_to_num(data) can one time return 1 to 9 and the other time return some money amount ???
data contains money amount if i'm right, so forget the new menu tutorial and use item value instead of the "key = str_to_num" system, instead of checking item == MENU_EXIT at first, just check if item is <0, then you can retrieve money amount safely.
__________________