IF statement breaking? Pages won’t advance

All about the past, current and future webteases and the art of webteasing in general.
---
Post Reply
bbb11__
Explorer
Explorer
Posts: 74
Joined: Thu May 18, 2023 7:43 pm

IF statement breaking? Pages won’t advance

Post by bbb11__ »

I have page A that routes to page B

Page B’s first action is an IF statement: if last_page == “xyz” || var == false then go page C else continue

I have verified the variables are correct, even putting a SAY action to call the variables in front of the if. When I enable the IF the tease freezes on page A. If I remove/disable the IF it goes through. Again the variables are correct.

Any thoughts??
User avatar
StellaRack
Explorer At Heart
Explorer At Heart
Posts: 233
Joined: Wed Jan 03, 2024 9:13 pm
Gender: Femboy
Sexual Orientation: Straight
I am a: Submissive

Re: IF statement breaking? Pages won’t advance

Post by StellaRack »

I am sure you know this stuff given your existing teases but just to give my 2c

var is a keyword in JS so that could be causing issues. (Assuming you are using that as the real variable name)
You message has the pretty " that could be it. (Or that could be auto formatting on the forum)
last_page is not built it so that might not be set. (But you did say the variables are correct)

If you open inspect element then trigger the freezes that might give a clue
Like if it is a SyntaxError
bbb11__
Explorer
Explorer
Posts: 74
Joined: Thu May 18, 2023 7:43 pm

Re: IF statement breaking? Pages won’t advance

Post by bbb11__ »

Those were placeholder names for the forum. i define last_page as a variable in the initial eval settings and the other variable is a true/false “deep” setting.

Im away from a computer for a while but will try inspect element when i can. Thanks for the tip!
bbb11__
Explorer
Explorer
Posts: 74
Joined: Thu May 18, 2023 7:43 pm

Re: IF statement breaking? Pages won’t advance

Post by bbb11__ »

I think my whole tease is broken somehow.

I changed it so page A goes to a random page. Now the tease won’t go from the start page to page A in preview. I haven’t changed any variables or anything. The tease was working fine until I uploaded some audio files and audio option is active. And the tease was working with some audio files in place.

page start is just a choice button when clicked it goes to page A. It won’t do that. The choice button doesn’t even load anymore. Hours of work might be gone :weep:


START PAGE
choice: “begin” - no action
go-to: positionA

PositionA
If pos == “abc” then go-to: pos* else continue
Timer 22s
Eval: pos = “abc”; arousal += 1
go-to: bj-a

Bj-a
If last_page == “bj-a” || deep == false then go-to: bj-* else continue
Timer 8-16s
Eval: last_page = “bj-a”; arousal += 1
go-to: continue-page

If I change the final go-to on PositionA to bj-* the start page crashes otherwise it crashes before going to bj-a. If I remove the if statement on bj-a it runs until the final go to and crashes on bj-a before going to continue page
Thamrill
Explorer At Heart
Explorer At Heart
Posts: 301
Joined: Thu Jan 03, 2013 4:55 pm
Gender: Male
Sexual Orientation: Straight
I am a: Submissive

Re: IF statement breaking? Pages won’t advance

Post by Thamrill »

bbb11__ wrote: Thu May 28, 2026 10:32 am I think my whole tease is broken somehow.

I changed it so page A goes to a random page. Now the tease won’t go from the start page to page A in preview. I haven’t changed any variables or anything. The tease was working fine until I uploaded some audio files and audio option is active. And the tease was working with some audio files in place.

page start is just a choice button when clicked it goes to page A. It won’t do that. The choice button doesn’t even load anymore. Hours of work might be gone :weep:


START PAGE
choice: “begin” - no action
go-to: positionA

PositionA
If pos == “abc” then go-to: pos* else continue
Timer 22s
Eval: pos = “abc”; arousal += 1
go-to: bj-a

Bj-a
If last_page == “bj-a” || deep == false then go-to: bj-* else continue
Timer 8-16s
Eval: last_page = “bj-a”; arousal += 1
go-to: continue-page

If I change the final go-to on PositionA to bj-* the start page crashes otherwise it crashes before going to bj-a. If I remove the if statement on bj-a it runs until the final go to and crashes on bj-a before going to continue page
Hi. Can you share the preview link? It's easier to find bugs like that. From your snippet it's difficult to understand if the errors are due to how you reported the structure or in the actual tease (e.g., start page goto has lower-case initial, while the page name is upper-case initial)
Image

Image

Image
bbb11__
Explorer
Explorer
Posts: 74
Joined: Thu May 18, 2023 7:43 pm

Re: IF statement breaking? Pages won’t advance

Post by bbb11__ »

Thamrill
Explorer At Heart
Explorer At Heart
Posts: 301
Joined: Thu Jan 03, 2013 4:55 pm
Gender: Male
Sexual Orientation: Straight
I am a: Submissive

Re: IF statement breaking? Pages won’t advance

Post by Thamrill »

bbb11__ wrote: Thu May 28, 2026 11:15 am https://milovana.com/eos/editor/81671/edit

https://milovana.com/eos/editor/81671/preview

Editor and preview links above.
In the menu go under "Share" and share the link provided; it's not possible for other users to see a WIP tease unless you share it like that
Image

Image

Image
bbb11__
Explorer
Explorer
Posts: 74
Joined: Thu May 18, 2023 7:43 pm

Re: IF statement breaking? Pages won’t advance

Post by bbb11__ »

https://milovana.com/webteases/showtea ... c034532f22

It’s been a while since I’ve worked on teases, can you tell? Hopefully this link works. Thanks!!
Thamrill
Explorer At Heart
Explorer At Heart
Posts: 301
Joined: Thu Jan 03, 2013 4:55 pm
Gender: Male
Sexual Orientation: Straight
I am a: Submissive

Re: IF statement breaking? Pages won’t advance

Post by Thamrill »

bbb11__ wrote: Thu May 28, 2026 12:27 pm https://milovana.com/webteases/showtea ... c034532f22

It’s been a while since I’ve worked on teases, can you tell? Hopefully this link works. Thanks!!
The issue is that in the if you can go in any page starting with bj-; so probably the engine preloads all pages matching the pattern. In the handjob one the audio play action refers to a non existing file. My guess is that when the engine tries preloading the bj-handjob page, it fails findingthe media file and crashes.

edit: I confirm changing the file the tease works
Image

Image

Image
bbb11__
Explorer
Explorer
Posts: 74
Joined: Thu May 18, 2023 7:43 pm

Re: IF statement breaking? Pages won’t advance

Post by bbb11__ »

THANK YOU!!!!!

I thought I’d checked that! I swear I checked every other audio file on the tease, somehow missed that one. Thank you so much, phew. Kinda glad it was a stupid easy mistake and not really a coding thing. Thank you!!
Thamrill
Explorer At Heart
Explorer At Heart
Posts: 301
Joined: Thu Jan 03, 2013 4:55 pm
Gender: Male
Sexual Orientation: Straight
I am a: Submissive

Re: IF statement breaking? Pages won’t advance

Post by Thamrill »

bbb11__ wrote: Thu May 28, 2026 7:50 pm THANK YOU!!!!!

I thought I’d checked that! I swear I checked every other audio file on the tease, somehow missed that one. Thank you so much, phew. Kinda glad it was a stupid easy mistake and not really a coding thing. Thank you!!
No problem. I'm glad I could help you.

Just as a head up; if you open your browser console (usually under developer tools, or something similar) you can see what fails while running a tease. In particular here the error mentioned a hash, which meant a missing file. It helped pin-pointing the error
Image

Image

Image
bbb11__
Explorer
Explorer
Posts: 74
Joined: Thu May 18, 2023 7:43 pm

Re: IF statement breaking? Pages won’t advance

Post by bbb11__ »

I’ve been on mobile all day, but will recreate the error and practice your tip! That’ll be super useful as I flesh this out more.
Post Reply