-1 won’t give -1

Project link:

What is happening in the project, and what do you want to happen instead?
i can’t make myself -1. What I do want to happen is it to at least give a result

Screenshots of code:


what happens

8 Likes

I’m not sure exactly what you’re trying to do. Could you elaborate?

2 Likes

This is because -1 simply does not exist in hopscotch

4 Likes
  1. You don’t seem to ever include any non-matching characters
  2. the / characters and the i part of the regex are handled by hs, what you’re matching for is basically this:
    /\/[iljrtf1]\/i/i which will never be true for just one character.

@hopbot -1

6 Likes
9 Likes

hopbot, you are a disgrace.

(for legal reasons, you are not)

4 Likes

Ok that did help for later but it didn’t work!


4 Likes

Sus

5 Likes

you could enter a different number but make the game display -1, if that is what you want to happen.

4 Likes

in other words, for the variable, type a different number e.g. 600 and put the results for -1.

4 Likes

There is nothing here

2 Likes

It is supposed to be like that

2 Likes

It’s like the typewriter effect but used in a different way

3 Likes

I looked at it further, and -1 is never called again. This is because the variable be is already less than the length of the var -1 - 1, and you made it so it’s only called when be = length(-1)-1 (which will never occur unless the code is 1 letter long).

I could only get it to return -1 once I made the change (see image).

4 Likes