Is there a Bug in my code?

XPikachu

BSOD
Messages
313
Location
Parallel Universe
I am having trouble with my BYOB program I think there is a bug in it:

When i want one fish or chips or hot dogs I get charged for two.

It should ask what you want, how much and charge you in the right way.

It seems to times two what no matter what number of fish I want.

Could someone help, I can send you the .ypr file.
 

Attachments

  • Untitled.jpg
    Untitled.jpg
    94.8 KB · Views: 9
I would imagine that the block which says "Change Fish by Fish * Answer" (and the other similar ones) are adding Fish * Answer to the original value of Fish, meaning you would end up getting charged for one extra.

You probably don't want to use the same variables for storing the price of fish, chips etc. and setting the value of the fish, chips, etc. that have been bought - that's where I'd say you're going wrong.

Oh, and I'm not usually a language-police person, but the language in the question in that screenshot is a bit strong for posting here really...
 
You probably don't want to use the same variables for storing the price of fish, chips etc. and setting the value of the fish, chips, etc. that have been bought - that's where I'd say you're going wrong.

Im new to BYOB and I honestly don't know how to fix it.

Yeah I should have changed the lang in it before I posted it :whistling:

Here is my taxi one and it works, same with my bank one.
 

Attachments

  • Untitled.jpg
    Untitled.jpg
    94.5 KB · Views: 6
  • Unt3itled.jpg
    Unt3itled.jpg
    97 KB · Views: 4
Back
Top Bottom