Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How do I remove part of an answer
- Endermangames2
- Scratcher
18 posts
How do I remove part of an answer
I'm trying to remove part of a answer to a question in order to set it as a variable that my current code can work with, but cant seem to figure out how.
More specifically, I'm trying to remove part of a command in order to just get the number
The command in question
//dash #
the # is a number
More specifically, I'm trying to remove part of a command in order to just get the number
The command in question
//dash #
the # is a number
- PlatoHero_
- Scratcher
500+ posts
How do I remove part of an answer
Will the number have many digits?
Last edited by PlatoHero_ (Dec. 1, 2021 14:49:02)
Shift + down to see the rest
when gf clickedIf you want some cookies, click or press the rickrolls.
repeat until <not <[List of Scratchers v] contains [non-CoR member]>
say (join [The Chair of Republic] (join [us,] [we have cookies!]))
end
There are three bands called stones: Rolling stones, trolling stones and rickrolling stones.
List of Scratchers I like and have left:
-TheGreenNinja-
the2000
GoldenEagleStudios
Rae-TV is going to be the next.
- Endermangames2
- Scratcher
18 posts
How do I remove part of an answer
normally, no, but i wish to allow any number
but normally it wont be massive
but normally it wont be massive
- PlatoHero_
- Scratcher
500+ posts
How do I remove part of an answer
Hmm, I have an idea. normally, no, but i wish to allow any number
but normally it wont be massive
define take the numberAfter you run the command take the number, the dash number variable will be set to the number part. Hope this helped.
set [counter v] to (7)
repeat ((length of (answer)) - (7))
change [counter v] by [1]
set [dash number v] to (join (dash number) (letter (counter) of (answer))
Last edited by PlatoHero_ (Dec. 1, 2021 21:28:24)
Shift + down to see the rest
when gf clickedIf you want some cookies, click or press the rickrolls.
repeat until <not <[List of Scratchers v] contains [non-CoR member]>
say (join [The Chair of Republic] (join [us,] [we have cookies!]))
end
There are three bands called stones: Rolling stones, trolling stones and rickrolling stones.
List of Scratchers I like and have left:
-TheGreenNinja-
the2000
GoldenEagleStudios
Rae-TV is going to be the next.
- Endermangames2
- Scratcher
18 posts
How do I remove part of an answer
Thank you
Last edited by Endermangames2 (Dec. 1, 2021 16:32:36)
- Endermangames2
- Scratcher
18 posts
How do I remove part of an answer
I implemented it, had to dump all the numbers into a list then join them together before putting it in a variable, but apart from that it worked really well! Thank you
- PlatoHero_
- Scratcher
500+ posts
How do I remove part of an answer
No need to thank, just carry on with your project. I implemented it, had to dump all the numbers into a list then join them together before putting it in a variable, but apart from that it worked really well! Thank you
Shift + down to see the rest
when gf clickedIf you want some cookies, click or press the rickrolls.
repeat until <not <[List of Scratchers v] contains [non-CoR member]>
say (join [The Chair of Republic] (join [us,] [we have cookies!]))
end
There are three bands called stones: Rolling stones, trolling stones and rickrolling stones.
List of Scratchers I like and have left:
-TheGreenNinja-
the2000
GoldenEagleStudios
Rae-TV is going to be the next.
- PlatoHero_
- Scratcher
500+ posts
How do I remove part of an answer
I changed the originall script so that you won't need lists. I implemented it, had to dump all the numbers into a list then join them together before putting it in a variable, but apart from that it worked really well! Thank you
Shift + down to see the rest
when gf clickedIf you want some cookies, click or press the rickrolls.
repeat until <not <[List of Scratchers v] contains [non-CoR member]>
say (join [The Chair of Republic] (join [us,] [we have cookies!]))
end
There are three bands called stones: Rolling stones, trolling stones and rickrolling stones.
List of Scratchers I like and have left:
-TheGreenNinja-
the2000
GoldenEagleStudios
Rae-TV is going to be the next.
- Discussion Forums
- » Help with Scripts
- » How do I remove part of an answer