face-hh / bussin

An esolang in TypeScript, for heaven's sake.
Apache License 2.0
566 stars 37 forks source link

The sus function can't compare numbers from yap("") #39

Closed SzKristof97 closed 9 months ago

SzKristof97 commented 9 months ago

image

I'm just trying this thing out, but i can't get trough here. When the code reaches the sus (if) function it just ignores everything and jumps directly to the last impostor (else).

image

Am i missing something? I need to convert the input into a number somehow? :D Any idea how can i resolve this problem?

face-hh commented 9 months ago

This has been reported in the Discord server:

I've done some further testing and the problem seems to be the input gotten with yap(). If I set the variable "num" to a number I know will pass, the programm runs without problems. When I use yap() however the input that is recognized as "6" for example returns null after modulo operation.

Unfortunately I don't have time to dive back into this project, if someone is willing to create a pull request with the fix, I might look into it

SzKristof97 commented 9 months ago

Thanks for the answer anyway. :)

Symmettry commented 9 months ago

i had made a pull request back in november which didn’t get a response; i might be able to fix this issue later but only really if face hh cares about the pull requests anyway

face-hh commented 9 months ago

i had made a pull request back in november which didn’t get a response; i might be able to fix this issue later but only really if face hh cares about the pull requests anyway

I've checked the pull request before but always forgot to fetch to test it locally, I'll make sure to do that tomorrow

Symmettry commented 7 months ago

Just noticed; this problem shouldn't have been closed when it did. This is just because yap() returns a string, e.g. it's like doing lit x be "6" rn so you can't compare strings to numbers. This is fixed by the parseNumber() function however.