Can someone help me find the glitching code in this?

bugs

#1

Hi, I have a problem. So basically, in my game, it's supposed to say you win or you lose after the values are calculated and the text for the amount of things bought are shown. It is saying You Win and/or You Lose before the text amounts are even showing up. I have looked through my code in the #food sprite and the wol (win or lose) sprite. I cannot seem to find any mistakes in it. Can someone please help me find the bugs in this code?


#2

And since it is Sunday, I'd think everyone was on, and I'd appreciate some help :slight_smile:


#3
OMTL

List (114 tags)
@A.K_Studios46
@Allyb
@Artistic_cat
@ArtyAnimal
@AvocadoDont
@AwesomeNachos
@Awesome_giraffe
@BaconStudios
@BerryFOX
@BlastFusion
@braybraylovesmonkeys
@BubblegumCupcakeMix
@ButterBark
@celine
@ChocolateFox
@CodePerfect
@codingkit
@ColorlessCanvas
@ColourfulBlack
@ConnellCoder
@CreationsOfaNoob
@cupcakemaniac1
@Cutedolphin
@DatKawaiiPillow
@DECODECO
@DiamondDragon
@diss_track_queen
@DMF
@DragonMc
@Dylan329
@EmojiArts
@EmojisRUs
@Explorer_
@ExquisiteSoup
@FascinatingTreehouse
@FCD
@FearlessPhoenix
@FluffyMarshmellow
@FreshGuppy
@FunkyGoldfish
@GiraffeProductions
@GLaDOS_On_Da_Forum
@Gobli09
@Goobrgrlrye
@gryphonroadblocks
@happy12345678910
@HappyPerson
@Hitokage
@Houseelf87
@HRR1213
@IKeudin
@ILoveFashion12
@Jess888
@Jojo
@JonnyGamer
@KawaiiHotDog
@KawaiiOaktree3
@Kayro
@kenlauescuadro
@KiraForPrez
@KoolM123
@Kosho
@kubajr
@KVJ
@LavenderArts
@LegendOfFriday
@Mei-The-Riolu
@Milkypup lol
@Mothwolf
@Mr.rex
@NeoPixel
@Petrichor
@Paige1212
@Paydent12
@PerfectPanda24
@PianoGorilla2006
@PIANOMAN
@Pink_Roses
@Periwinkle_Dolphin
@Potter_Head
@PumpkinGirl
@Puppylulu
@PurpleStorybook
@Rainboom
@Rider
@RubyStars
@RubyWolf1
@ScarySweetheart
@Sensei_Coder
@Silverdolphin
@Skyarmygenral
@shamrockcat
@SnowGirl_Studios
@sophia71205
@StarKid
@StarryDream
@Steelhooves
@StRiKe_Charler123
@Strongerthanyou
@Sugarisyummy
@Sweater
@TACOCODE
@treefrogstudios
@TrevCoding
@UnderagedCoder1
@Valgo
@ValueGamesStudio
@Vortex.inc
@waddlemarco
@W-Healer
@WhiteFeathers
@William04GamerA
@Work_kids_coding
@Yellow_Mellow
@YuxinaYammy
@Zachyswag
Get the latest list here: http://forum.gethopscotch.com/t/official-mass-tag-list-omtl/16843


#4

Okay, I'll try looking through it. :D


#5

Hmmm, I'll see what I can do.


#6

May you please list all the objects that affect the "win" variable?


#7

So, I'm a little bit stumped.

I think the problem is that the values that must be a certain number for you to win or lose are being accidentally set to that number somehow?


#8

Well, the #food and all the things being sold, and the Wol text.


#9

I set that when invisibility for alright... is 0, I did two whens in one object and set the values after that.

SO in that object it would be

When alright invis% = 0
Wait 3k milliseconds
[you win ability]
set win to 1
Set lose to 0

And in another rule the same thing but you use it for lose and the variables and ability is different


#10

Where do you store the variables for the foods? Sometimes, even if I choose the wrong foods, it tells me to pay my taxes, and that I win.


#11

In #food I think


#12

What the why does this have nine likes
facepalm it's just the OMTL XD


#13

Wait, didn't you post this a few months ago as well?


#14

YEHA but I finished the game now but it has different glitches


#15

I looked through the project posted above and do see some problems related to "You win"/"You lose". Are you still looking for help?


#16

Yes, would you care to give me some help?


#17

Sure.

After it says "I got..." can you describe for me exactly what you want it to do?

  1. List out what was purchased, e.g., 5.... Apples.... 2.... Shrimps
  2. Then display either "You win" or "You Lose"

#18

Not sure if this will work but let's see. I took a bunch of screenshots while I edited the code and made them into a slideshow.

[https://www.dropbox.com/s/y3ep3wgxmjm9dq4/Video%20May%2004%2C%2010%2052%2021%20PM.mp4?dl=0]


#19

Wow I think that's lovely of you to make that...I was just going to add, does screen-recording work? (You can use the in-app screen recorder then press edit to record the editing screen too)


#20

Oh I can't see that, sorry I didn't reply earlier by the way