Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Please read the forum rules before posting.

Check if you are posting in the correct category.

The Off Topic section is not meant for discussing Cookie Clicker.
⚠️ The DashNet forums will be shut down on September 12th 2019.⚠️

Please see here for more information.

[BUG] Odd behavior with else if statements in on click: effects

MiningcookiesVIIIMiningcookiesVIII Posts: 1,861Member ✭✭✭✭✭
edited May 2018 in Suggestions & Bug Reports
I've noticed this odd bug when using else if statements for buttons' on click: effects.
Basically, if you have two varying amounts of a resource being yielded, the first outcome will have the second outcome added to it. For example:
Buttons *bakeCookie on click: if: (have PlasticCursor) yield 2 cookies else yield 1 cookie end
would result in the cookie giving 1 cookie per click if Plastic Cursor wasn't owned, but 3 cookies if it was. The same happens with local variables, or any other value.
Luckily, it's pretty easy to work around in most cases, simply by subtracting however many it is in the "else" part from the "if" part.
I said, STOP SUICIDING. ~Idler
Uh your so ugly I frgotz how 2 grammer ~Darkmatterfire
Why is 10 afraid of people who can't count? Because 7 8 10! ~Pighouse
You can't get into sigs if you try hard!!!!!!!!!!!1!!!!!!!11!!~Darkmatterfire
Post farmer, an IGM game I made. Thingk RPG, a creative forum game I made. Do not pity the dead, Harry. Pity the living, and, above all those who live without love.
~A. Dumbledore


  • morkysherkmorkysherk Posts: 133Member ✭✭✭
    Changing it to
    if (have PlasticCursor) yield 2 cookies else yield 1 cookie end
    should also work
Sign In or Register to comment.