#dude /gift doesnt work for me only

43 messages · Page 1 of 1 (latest)

scenic nebula
#

it work normally when try /gift osk

#

but when try /gift 5han it doesnt work bcuz system recognize its /gift 5

cedar yoke
#

lol oh no

boreal mango
#

💀

velvet depot
#

is this just javascript jank lmao

boreal mango
#

yes

regal rover
#

So I presume that TETR.IO executes parseInt on a parameter, then if it's NaN, it thinks it's a string and that's a playername.

#

Number(string) does not have this issue

#

Of course it parses strings containing numbers fine

#

So Math.floor(Number(string)) should be a drop-in replacement

somber cosmos
orchid pagoda
#

im gonna be that guy but how tf is masturbeast not inappropriate

mild scroll
tribal jolt
regal rover
#

So this command will roll 250 players (as that's the limit) instead of targetting player 7579

#

So maybe this should be implemented as a separate command (like /giftrandom)?

tribal jolt
#

it's not like you can roll seven thousand players in the first place (it just caps out to 250)

maybe the limit could be lowered to 99 so there's absolutely no confusion lol (do people really roll 250?)

#

yes i know it still parses that as a number of people to roll

hushed herald
#

qp2 might be a decent reason for people to roll >99

tribal jolt
#

yeah but do they actually is the question

hushed herald
#

yeah i havent seen any huge bombs lately

crystal belfry
tribal jolt
#

ya

#

i mean it could just ignore padding 0s too right lol

little rock
#

I think \"[name]\" will help the system tell the difference.

tribal jolt
#

wat

little rock
#

Name is a string

#

I mean you can quotation mark around the name (eg /gift "10008" instead of /gift 10008)

tribal jolt
#

yeah but that's a needless compromise

opal hill
#

shall be fixed next update, itll make it so if a user is in the room with such a name itll always prefer that

scenic nebula
#

based

crystal belfry
#

Let me gift 112 people. why am I only allowed to gift a user called 112 droidcry

tribal jolt
#

yeah what if you could add a # to override the username doideyes

ancient finch
#

peak javascript

#

imagine not using typescript frr

cedar yoke
#

typescript doesn’t fix this

ancient finch
#

ok what would

cedar yoke
#

a change to the logic

#

an entirely numeric username is ambiguous, it’s not a typing issue