[EOS] Can't figure why my tease freezes

Post all technical issues and questions here. We'll gladly help you wherever we can.
Post Reply
Epton
Explorer At Heart
Explorer At Heart
Posts: 111
Joined: Sun Mar 05, 2017 9:56 am

[EOS] Can't figure why my tease freezes

Post by Epton »

Hey guys, I am trying to use 1 IF to check if a variable is true and then inside of it I use another IF that should pick the number from the function that generated it. can't I use the called function after the first IF? :\'-(
My Function:

function Resultup(max) {
return 1 + Math.floor(Math.random() * max)
}
function Results() {
return Resultup(8)
}

Image
It continues that way up to Resultsup8


Incase you were wondering if I load Resultdown
Image
kerkersklave
Explorer At Heart
Explorer At Heart
Posts: 560
Joined: Sun Jul 06, 2014 2:11 pm
Gender: Male
Sexual Orientation: Open to new ideas!
I am a: Slave

Re: [EOS] Can't figure why my tease freezes

Post by kerkersklave »

One thing that sticks out: you use the name Resultsup both for a function and a variable. They share the same namespace, so when you assign to Resultsup, you are overwriting the function and trying to call it will result in an error. Should only happen though if you run that code twice or you did the same thing before in some other way.
Epton
Explorer At Heart
Explorer At Heart
Posts: 111
Joined: Sun Mar 05, 2017 9:56 am

Re: [EOS] Can't figure why my tease freezes

Post by Epton »

kerkersklave wrote: Wed Mar 15, 2023 9:55 pm One thing that sticks out: you use the name Resultsup both for a function and a variable. They share the same namespace, so when you assign to Resultsup, you are overwriting the function and trying to call it will result in an error. Should only happen though if you run that code twice or you did the same thing before in some other way.
I know it is a bit confusing but I am not

Function:
Resultup(no s here) and Results

Variable:
Resultsup (the s is here)
Thamrill
Explorer At Heart
Explorer At Heart
Posts: 266
Joined: Thu Jan 03, 2013 4:55 pm
Gender: Male
Sexual Orientation: Straight
I am a: Submissive

Re: [EOS] Can't figure why my tease freezes

Post by Thamrill »

Epton wrote: Thu Mar 16, 2023 5:37 pm
kerkersklave wrote: Wed Mar 15, 2023 9:55 pm One thing that sticks out: you use the name Resultsup both for a function and a variable. They share the same namespace, so when you assign to Resultsup, you are overwriting the function and trying to call it will result in an error. Should only happen though if you run that code twice or you did the same thing before in some other way.
I know it is a bit confusing but I am not

Function:
Resultup(no s here) and Results

Variable:
Resultsup (the s is here)
Looking only at a snippet of code is not very helpful to identify the issue; can you share the script in preview mode?
Image

Image

Image
Epton
Explorer At Heart
Explorer At Heart
Posts: 111
Joined: Sun Mar 05, 2017 9:56 am

Re: [EOS] Can't figure why my tease freezes

Post by Epton »

Thamrill wrote: Thu Mar 16, 2023 7:31 pm
Epton wrote: Thu Mar 16, 2023 5:37 pm
kerkersklave wrote: Wed Mar 15, 2023 9:55 pm One thing that sticks out: you use the name Resultsup both for a function and a variable. They share the same namespace, so when you assign to Resultsup, you are overwriting the function and trying to call it will result in an error. Should only happen though if you run that code twice or you did the same thing before in some other way.
I know it is a bit confusing but I am not

Function:
Resultup(no s here) and Results

Variable:
Resultsup (the s is here)
Looking only at a snippet of code is not very helpful to identify the issue; can you share the script in preview mode?
This is all of the code.
I have a function in init aka Results()
I use Resultdown1/2/3/4.... to count how many times each option was chosen and if it is 2 it goes to a different page, that is it.
The error I get is that it is not able to read the eval: Resultsup = Resultup() [what I've marked in blue]. if I use it before IF Virgin == True, then it works just fine.

https://milovana.com/webteases/showteas ... 5526a14bad
Attachments
Screenshot_2.jpg
Screenshot_2.jpg (87.66 KiB) Viewed 1900 times
Thamrill
Explorer At Heart
Explorer At Heart
Posts: 266
Joined: Thu Jan 03, 2013 4:55 pm
Gender: Male
Sexual Orientation: Straight
I am a: Submissive

Re: [EOS] Can't figure why my tease freezes

Post by Thamrill »

Epton wrote: Thu Mar 16, 2023 8:33 pm
Thamrill wrote: Thu Mar 16, 2023 7:31 pm
Epton wrote: Thu Mar 16, 2023 5:37 pm
I know it is a bit confusing but I am not

Function:
Resultup(no s here) and Results

Variable:
Resultsup (the s is here)
Looking only at a snippet of code is not very helpful to identify the issue; can you share the script in preview mode?
This is all of the code.
I have a function in init aka Results()
I use Resultdown1/2/3/4.... to count how many times each option was chosen and if it is 2 it goes to a different page, that is it.
The error I get is that it is not able to read the eval: Resultsup = Resultup() [what I've marked in blue]. if I use it before IF Virgin == True, then it works just fine.

https://milovana.com/webteases/showteas ... 5526a14bad
As a first look, you haven't closed the curly bracket of the Results function in the Initialization scripts. Adding it the tease runs, otherwise it doesn't even load. I will look more into it, but as a first comment all nested if actions make for a difficult to maintain code and you should consider if it wouldn't be better to reorganize the code in different pages, flattening the trees of actions
Image

Image

Image
Epton
Explorer At Heart
Explorer At Heart
Posts: 111
Joined: Sun Mar 05, 2017 9:56 am

Re: [EOS] Can't figure why my tease freezes

Post by Epton »

Thamrill wrote: Fri Mar 17, 2023 5:35 am
Epton wrote: Thu Mar 16, 2023 8:33 pm
Thamrill wrote: Thu Mar 16, 2023 7:31 pm

Looking only at a snippet of code is not very helpful to identify the issue; can you share the script in preview mode?
This is all of the code.
I have a function in init aka Results()
I use Resultdown1/2/3/4.... to count how many times each option was chosen and if it is 2 it goes to a different page, that is it.
The error I get is that it is not able to read the eval: Resultsup = Resultup() [what I've marked in blue]. if I use it before IF Virgin == True, then it works just fine.

https://milovana.com/webteases/showteas ... 5526a14bad
As a first look, you haven't closed the curly bracket of the Results function in the Initialization scripts. Adding it the tease runs, otherwise it doesn't even load. I will look more into it, but as a first comment all nested if actions make for a difficult to maintain code and you should consider if it wouldn't be better to reorganize the code in different pages, flattening the trees of actions
I did close them I noticed as I was about to reply, I didn't know the share link changes each save after the tease is released sorry.
I'll think about reorganizing the nested ifs that can load from different page like the eval one I guess.
I appreciate your help
https://milovana.com/webteases/showteas ... 22ac61b383

It seems that the curly brackets is what froze my tease lol now im back to the IF problem. Thank you for the reply it helped me to look at where I forgot to look at lol, this thread can be considered as closed :) .
Thamrill
Explorer At Heart
Explorer At Heart
Posts: 266
Joined: Thu Jan 03, 2013 4:55 pm
Gender: Male
Sexual Orientation: Straight
I am a: Submissive

Re: [EOS] Can't figure why my tease freezes

Post by Thamrill »

Epton wrote: Fri Mar 17, 2023 9:45 am
Thamrill wrote: Fri Mar 17, 2023 5:35 am
Epton wrote: Thu Mar 16, 2023 8:33 pm
This is all of the code.
I have a function in init aka Results()
I use Resultdown1/2/3/4.... to count how many times each option was chosen and if it is 2 it goes to a different page, that is it.
The error I get is that it is not able to read the eval: Resultsup = Resultup() [what I've marked in blue]. if I use it before IF Virgin == True, then it works just fine.

https://milovana.com/webteases/showteas ... 5526a14bad
As a first look, you haven't closed the curly bracket of the Results function in the Initialization scripts. Adding it the tease runs, otherwise it doesn't even load. I will look more into it, but as a first comment all nested if actions make for a difficult to maintain code and you should consider if it wouldn't be better to reorganize the code in different pages, flattening the trees of actions
I did close them I noticed as I was about to reply, I didn't know the share link changes each save after the tease is released sorry.
I'll think about reorganizing the nested ifs that can load from different page like the eval one I guess.
I appreciate your help
https://milovana.com/webteases/showteas ... 22ac61b383

It seems that the curly brackets is what froze my tease lol now im back to the IF problem. Thank you for the reply it helped me to look at where I forgot to look at lol, this thread can be considered as closed :) .
One more thing I found is that I got this:
ReferenceError: Resultsup is not defined
at Interpreter.unwind (interpreter.min.js:1:57275)
at Interpreter.throwException (interpreter.min.js:1:55951)
at Interpreter.getValueFromScope (interpreter.min.js:1:53867)
at Interpreter.stepIdentifier (interpreter.min.js:1:72938)
at Interpreter.step (interpreter.min.js:1:3938)
at Interpreter.run (interpreter.min.js:1:4285)
at n.value (VirtualMachine.js:29:23)
at Object.run (if.js:16:24)
at ActionQueue.js:54:72
at u (runtime.js:45:40)

So what i feel to suggest you (and this is one of the reason I personally don't like Javascript) is to define all the variables that you're going to need in the tese in the initialization script. The error arises in page "Results" in the If action checking for virginity.

Another thing that I feel I should tell you, is that in many cases you are creating an excessive ammount of eval actions. In every eval action you can put multiple lines of code, so you can put multiple instructions inside a single action, rather than placing many eval actions one after the other
Image

Image

Image
Epton
Explorer At Heart
Explorer At Heart
Posts: 111
Joined: Sun Mar 05, 2017 9:56 am

Re: [EOS] Can't figure why my tease freezes

Post by Epton »

Thamrill wrote: Fri Mar 17, 2023 3:39 pm
Epton wrote: Fri Mar 17, 2023 9:45 am
Thamrill wrote: Fri Mar 17, 2023 5:35 am

As a first look, you haven't closed the curly bracket of the Results function in the Initialization scripts. Adding it the tease runs, otherwise it doesn't even load. I will look more into it, but as a first comment all nested if actions make for a difficult to maintain code and you should consider if it wouldn't be better to reorganize the code in different pages, flattening the trees of actions
I did close them I noticed as I was about to reply, I didn't know the share link changes each save after the tease is released sorry.
I'll think about reorganizing the nested ifs that can load from different page like the eval one I guess.
I appreciate your help
https://milovana.com/webteases/showteas ... 22ac61b383

It seems that the curly brackets is what froze my tease lol now im back to the IF problem. Thank you for the reply it helped me to look at where I forgot to look at lol, this thread can be considered as closed :) .
One more thing I found is that I got this:
ReferenceError: Resultsup is not defined
at Interpreter.unwind (interpreter.min.js:1:57275)
at Interpreter.throwException (interpreter.min.js:1:55951)
at Interpreter.getValueFromScope (interpreter.min.js:1:53867)
at Interpreter.stepIdentifier (interpreter.min.js:1:72938)
at Interpreter.step (interpreter.min.js:1:3938)
at Interpreter.run (interpreter.min.js:1:4285)
at n.value (VirtualMachine.js:29:23)
at Object.run (if.js:16:24)
at ActionQueue.js:54:72
at u (runtime.js:45:40)

So what i feel to suggest you (and this is one of the reason I personally don't like Javascript) is to define all the variables that you're going to need in the tese in the initialization script. The error arises in page "Results" in the If action checking for virginity.

Another thing that I feel I should tell you, is that in many cases you are creating an excessive ammount of eval actions. In every eval action you can put multiple lines of code, so you can put multiple instructions inside a single action, rather than placing many eval actions one after the other
This is what I don't understand because I use up the same way as resultsup but for some reason resultsup doesn't work. the only difference is that up does not have an IF above it.

And I've done lots of evals because for some reason x= tease.getitem("x") doesn't work if it is not in an individual eval. so it simply stuck xD but thanks for mentioning it.

Edit:
OMG I am soooo stupid :\'-( ... I've placed it all under else of Resultdown3 so it obviously couldn't find it lol :whistle:

Thanks for the help :love:
Thamrill
Explorer At Heart
Explorer At Heart
Posts: 266
Joined: Thu Jan 03, 2013 4:55 pm
Gender: Male
Sexual Orientation: Straight
I am a: Submissive

Re: [EOS] Can't figure why my tease freezes

Post by Thamrill »

Epton wrote: Fri Mar 17, 2023 4:33 pm And I've done lots of evals because for some reason x= tease.getitem("x") doesn't work if it is not in an individual eval. so it simply stuck xD but thanks for mentioning it.
It should work for multiple commands; just put them in different lines and place a semicolumn at the ond of each line
Image

Image

Image
Post Reply

Who is online

Users browsing this forum: No registered users and 71 guests