Forum Discussion
ArturOlszewski
7 years agoCommunity Member
Change string into numeric variable
I have a test activity with 100 text variables (Q1-Q100) that are in fact numbers yet I needed string variables to use them in a printable report. Now, however, it turned out that it would be quite ...
RussellKillips-
7 years agoCommunity Member
Hello Artur,
Try:
var player=GetPlayer();
var text = player.GetVar("Q1");
var number = parseInt(text, 10);
player.SetVar("N1", number);
Related Content
- 12 months ago
- 12 months ago
- 12 months ago
- 12 months ago