silveralol
Advanced OT User
- Joined
- Mar 16, 2010
- Messages
- 1,484
- Solutions
- 9
- Reaction score
- 217
hellow...
How I can use a math.random in count items?
something like it:
is inside of a for
and then put items into a bag with the math.random count
the error is:
attempt to get length of field 'count' (a number value)
How I can use a math.random in count items?
something like it:
Code:
local count = reward[i].count[math.random(#reward[i].count)] -- I get errors using this line
and then put items into a bag with the math.random count
Code:
bag:addItem(reward[i].itemid, count)
attempt to get length of field 'count' (a number value)