Login
Remember
Register
Twine Q&A
Questions
Unanswered
Tags
Users
Ask a Question
Code of Conduct
Ask a Question
How to display integers as separated by ","
+1
vote
asked
Jan 20, 2018
by
PsychoFox
(
640
points)
So $resources.funds
shows
1,000,000
instead of
1000000
n00b level over 9999
twine2
sugarcube2-18
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Jan 20, 2018
by
Chapel
(
63.1k
points)
Try the
toLocaleString
method.
<<= $resources.funds.toLocaleString()>>
Please
log in
or
register
to add a comment.
This site has been placed in read-only mode. Please use the
Interactive Fiction Community Forum
instead.
Related questions
How to create a link to display more text and other links in the same passage?
How to run a widget with the same name as a $variable
How to add images/gifs as backround in Sugarcube 2?
How can I create a scoreboard passage that I can append high scores to and sort by highest score?
How to recognise part of phrase as correct in textbox
Most popular tags
twine2
sugarcube2-21
sugarcube2
twine2-2-1
harlowe2-0-1
harlowe2-1-0
harlowe
sugarcube2-18
javascript
css
twine2-1-3
sugarcube
variable
variables
macro
twine
links
twine1
if
sugarcube2-28-2
harlowe2
audio
html
array
image
snowman
passages
passage
savegame
inventory
music
arrays
saves
link
time
sugarcube2-25-0
textbox
harlowe1-2-4
error
text
array-objects
set
images
2
question
sugarcube-2
code
color
sugarcube2-27
tweego
datamaps
history
background
sugarcube-2-28-2
sugarcube-2-21-0
ui-bar
sidebar
sugarcube2-25
choices
autosave
jquery
button
publish-to-file
widgets
typed
random
import
transition
loop
twine2-3-1
harlowe2-2-1
replace-macro
choice
objects
tags
harlowe3-0-2
for-macro
rpg
saving
stats
effects
save
stylesheet
click-macro
twine-2
user-input
animation
header
questions
format
object
0
ui
script
error-message
sugarcube2-21-0
sugarcube2-24-0
loadgame
twine2-2-0
adventures
...