How to convert user points into rupees in my task app

Hi everyone :waving_hand:
I am creating a task app in Kodular where users will earn random points by completing different tasks.

I want to set a system like this:
:backhand_index_pointing_right: 5 Points = β‚Ή1 (Indian Rupee)

For example, if a user has 500 points, it should show β‚Ή100.
I need help to add this auto conversion system in my app β€” so that points are automatically converted into rupees and shown in a label or text box.

Can anyone guide me on how to do this using blocks in App ?
(Like what math blocks and logic I should use)

Thanks in advance :folded_hands:

Hi Kabir,

Here’s Step-by-Step Block Setup:

  1. Add Components:
  • Label_Points β†’ To display user points
  • Label_Rupees β†’ To display rupees
  • (Optional) Button_Update β†’ To test conversion manually

:gear: Blocks Logic:

Option 1: Manual Button Update

When the user clicks a button:

when Button_Update.Click
    set Label_Rupees.Text to "β‚Ή" + (Label_Points.Text / 5)

:right_arrow: You can use:

  • Math Block: / (division)
  • Text Join Block: join "β‚Ή" (result)

So the logic in words:

Take the points text, divide it by 5, and join β€œβ‚Ήβ€ before the number.

1 Like

It can be useful to have a procedure in case you need to reuse it.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.