I told you, you need to convert the value stored/held within “amountDonated” into a number value.
Can you show me an example? i understand better when you send a visual becuase i have no idea how to convert the value stored/held within “amountDonated” i practically cant think right now.
amountDonated = tonumber(amountDonated) --returns nil if value cant be converted into a number
if amountDonated then --so we should perform the check here
if previousData then
return previousData + amountDonated
else
return amountDonated
end
end
1 Like