Ah so it looks like in fact its not using the correct version. Try this and see if it helps you: https://www.java.com/en/download/help/u ... ttings.xmlJimmy_McSkittles wrote: Sat May 16, 2020 10:17 pmNot sure by what you mean installed correctly. The only option I get when running the installer is folder destination. Should I set that as Program files x86 as opposed to just program files.ski23 wrote: Sat May 16, 2020 10:09 pmFrom the message it seems like you are on java 8 as that is class version 52. Can you make sure that your java was installed correctly? Also, you can type java -version in a command prompt to see your java version.Jimmy_McSkittles wrote: Sat May 16, 2020 10:05 pm
It seems to be saying that it was made with a newer version of java except I just installed java and I can't seem to get the runtime environment from 52 to 53.
[Tease Program] Tease-AI Java (1.4)
Moderator: 1885
-
ski23
- Explorer At Heart

- Posts: 466
- Joined: Sun Jun 11, 2017 12:53 am
- Gender: Male
- Sexual Orientation: Bisexual/Bi-Curious
- I am a: Switch
- Dom/me(s): Courtney
- Sub/Slave(s): Courtney
- Location: Virginia
- Contact:
Re: [Tease Program] Tease-AI Java (1.2.2)
-
Jimmy_McSkittles
- Explorer

- Posts: 11
- Joined: Tue Jan 29, 2019 12:16 am
- Gender: Male
- Sexual Orientation: Straight
- I am a: Submissive
Re: [Tease Program] Tease-AI Java (1.2.2)
OpenJDK binary still won't open and command prompt won't recognize the new java environment.ski23 wrote: Sat May 16, 2020 10:23 pmAh so it looks like in fact its not using the correct version. Try this and see if it helps you: https://www.java.com/en/download/help/u ... ttings.xmlJimmy_McSkittles wrote: Sat May 16, 2020 10:17 pmNot sure by what you mean installed correctly. The only option I get when running the installer is folder destination. Should I set that as Program files x86 as opposed to just program files.ski23 wrote: Sat May 16, 2020 10:09 pm
From the message it seems like you are on java 8 as that is class version 52. Can you make sure that your java was installed correctly? Also, you can type java -version in a command prompt to see your java version.
- Attachments
-
- Error.PNG (13.73 KiB) Viewed 2468 times
-
ski23
- Explorer At Heart

- Posts: 466
- Joined: Sun Jun 11, 2017 12:53 am
- Gender: Male
- Sexual Orientation: Bisexual/Bi-Curious
- I am a: Switch
- Dom/me(s): Courtney
- Sub/Slave(s): Courtney
- Location: Virginia
- Contact:
Re: [Tease Program] Tease-AI Java (1.2.2)
Can you look in your PATH system environment variable and see which java version is being referenced there?Jimmy_McSkittles wrote: Sat May 16, 2020 11:10 pmOpenJDK binary still won't open and command prompt won't recognize the new java environment.ski23 wrote: Sat May 16, 2020 10:23 pmAh so it looks like in fact its not using the correct version. Try this and see if it helps you: https://www.java.com/en/download/help/u ... ttings.xmlJimmy_McSkittles wrote: Sat May 16, 2020 10:17 pm
Not sure by what you mean installed correctly. The only option I get when running the installer is folder destination. Should I set that as Program files x86 as opposed to just program files.
Quote me, or PM me and I'll reply as soon as I can! 
Tease AI Java
Mischevious Tease AI Java Personality
Tease AI Java Developer's Guide
TAJUtils Guide
Tease AI Java
Mischevious Tease AI Java Personality
Tease AI Java Developer's Guide
TAJUtils Guide
-
Jimmy_McSkittles
- Explorer

- Posts: 11
- Joined: Tue Jan 29, 2019 12:16 am
- Gender: Male
- Sexual Orientation: Straight
- I am a: Submissive
Re: [Tease Program] Tease-AI Java (1.2.2)
Finally thanksski23 wrote: Sat May 16, 2020 11:13 pmCan you look in your PATH system environment variable and see which java version is being referenced there?Jimmy_McSkittles wrote: Sat May 16, 2020 11:10 pmOpenJDK binary still won't open and command prompt won't recognize the new java environment.ski23 wrote: Sat May 16, 2020 10:23 pm
Ah so it looks like in fact its not using the correct version. Try this and see if it helps you: https://www.java.com/en/download/help/u ... ttings.xml
- Attachments
-
- Fixed.PNG (55.71 KiB) Viewed 2464 times
-
ski23
- Explorer At Heart

- Posts: 466
- Joined: Sun Jun 11, 2017 12:53 am
- Gender: Male
- Sexual Orientation: Bisexual/Bi-Curious
- I am a: Switch
- Dom/me(s): Courtney
- Sub/Slave(s): Courtney
- Location: Virginia
- Contact:
Re: [Tease Program] Tease-AI Java (1.2.2)
I'm glad you got it working. Java versions can be a real pain in the butt sometimes!Jimmy_McSkittles wrote: Sat May 16, 2020 11:34 pmFinally thanksski23 wrote: Sat May 16, 2020 11:13 pmCan you look in your PATH system environment variable and see which java version is being referenced there?Jimmy_McSkittles wrote: Sat May 16, 2020 11:10 pm
OpenJDK binary still won't open and command prompt won't recognize the new java environment.
Quote me, or PM me and I'll reply as soon as I can! 
Tease AI Java
Mischevious Tease AI Java Personality
Tease AI Java Developer's Guide
TAJUtils Guide
Tease AI Java
Mischevious Tease AI Java Personality
Tease AI Java Developer's Guide
TAJUtils Guide
-
Triple Alfa
- Explorer At Heart

- Posts: 175
- Joined: Wed Dec 05, 2007 12:35 pm
Re: [Tease Program] Tease-AI Java (1.2.2)
Hey ski there is a problem with the new version you gave me.
This:
This:
Used to work flawlessly, but now everything after the first <b> is bold and the </b>'s show up in the chat.sendMessage("That should have been 'Yes <b>Mistress</b>' or 'Yes <b>Mistress %domName%</b>'.");
-
ski23
- Explorer At Heart

- Posts: 466
- Joined: Sun Jun 11, 2017 12:53 am
- Gender: Male
- Sexual Orientation: Bisexual/Bi-Curious
- I am a: Switch
- Dom/me(s): Courtney
- Sub/Slave(s): Courtney
- Location: Virginia
- Contact:
Re: [Tease Program] Tease-AI Java (1.2.2)
I can try to improve the logic but you dont need </b>. You can just use <> to end the formatting or start a new format and it will end the previous one.Triple Alfa wrote: Sun May 17, 2020 8:13 am Hey ski there is a problem with the new version you gave me.
This:Used to work flawlessly, but now everything after the first <b> is bold and the </b>'s show up in the chat.sendMessage("That should have been 'Yes <b>Mistress</b>' or 'Yes <b>Mistress %domName%</b>'.");
EDIT: Here is an updated version where your logic should work as intended as well:
https://www.mediafire.com/file/wfro4ydd ... I.jar/file
Quote me, or PM me and I'll reply as soon as I can! 
Tease AI Java
Mischevious Tease AI Java Personality
Tease AI Java Developer's Guide
TAJUtils Guide
Tease AI Java
Mischevious Tease AI Java Personality
Tease AI Java Developer's Guide
TAJUtils Guide
-
Triple Alfa
- Explorer At Heart

- Posts: 175
- Joined: Wed Dec 05, 2007 12:35 pm
Re: [Tease Program] Tease-AI Java (1.2.2)
Thank you, I did a quick test and it seems to work.ski23 wrote: Sun May 17, 2020 2:18 pm I can try to improve the logic but you dont need </b>. You can just use <> to end the formatting or start a new format and it will end the previous one.
EDIT: Here is an updated version where your logic should work as intended as well:
https://www.mediafire.com/file/wfro4ydd ... I.jar/file
Since I already had a bunch of text with the old logic working it'll save me time going over all the old code.
I understand why you might want to simplify code like this, but since there is a working public version out there you need to be careful with those kinds of changes.
-
ski23
- Explorer At Heart

- Posts: 466
- Joined: Sun Jun 11, 2017 12:53 am
- Gender: Male
- Sexual Orientation: Bisexual/Bi-Curious
- I am a: Switch
- Dom/me(s): Courtney
- Sub/Slave(s): Courtney
- Location: Virginia
- Contact:
Re: [Tease Program] Tease-AI Java (1.2.2)
Yea technically I didn’t make any changes. The way I mentioned is how it worked originally and the functionality you described GodDragon added in the recent update. However that was also the functionality that was breaking several pieces. Regardless it should all work now.Triple Alfa wrote: Mon May 18, 2020 7:47 amThank you, I did a quick test and it seems to work.ski23 wrote: Sun May 17, 2020 2:18 pm I can try to improve the logic but you dont need </b>. You can just use <> to end the formatting or start a new format and it will end the previous one.
EDIT: Here is an updated version where your logic should work as intended as well:
https://www.mediafire.com/file/wfro4ydd ... I.jar/file
Since I already had a bunch of text with the old logic working it'll save me time going over all the old code.
I understand why you might want to simplify code like this, but since there is a working public version out there you need to be careful with those kinds of changes.
Quote me, or PM me and I'll reply as soon as I can! 
Tease AI Java
Mischevious Tease AI Java Personality
Tease AI Java Developer's Guide
TAJUtils Guide
Tease AI Java
Mischevious Tease AI Java Personality
Tease AI Java Developer's Guide
TAJUtils Guide
-
GodDragon
- Explorer At Heart

- Posts: 795
- Joined: Sun Jun 11, 2017 4:30 pm
- Gender: Male
- Sexual Orientation: Straight
- I am a: Switch
Re: [Tease Program] Tease-AI Java (1.2.2)
It was working however I didn't push the latest changes. We are gonna go back to what I created if ski can verify it is working on his end too.ski23 wrote: Mon May 18, 2020 12:37 pmYea technically I didn’t make any changes. The way I mentioned is how it worked originally and the functionality you described GodDragon added in the recent update. However that was also the functionality that was breaking several pieces. Regardless it should all work now.Triple Alfa wrote: Mon May 18, 2020 7:47 amThank you, I did a quick test and it seems to work.ski23 wrote: Sun May 17, 2020 2:18 pm I can try to improve the logic but you dont need </b>. You can just use <> to end the formatting or start a new format and it will end the previous one.
EDIT: Here is an updated version where your logic should work as intended as well:
https://www.mediafire.com/file/wfro4ydd ... I.jar/file
Since I already had a bunch of text with the old logic working it'll save me time going over all the old code.
I understand why you might want to simplify code like this, but since there is a working public version out there you need to be careful with those kinds of changes.
I haven't had any of those issues yet. can you show some extracts from your log file to us please?Manolas Smith wrote: Tue May 12, 2020 3:12 pm Hi!
I've been trying to find information about this, and although it seems to be a recurring problem, I haven't really understood how to fix this.
During the session on Spicy, most of the url files doens't show, and neither does the Domme images. I've setup it as indicated (actually I haven't changed the url files from the last update, which I have installed from scratch).
Sometimes, a couple of domme images show, but most of the time don't.
Any help here?
Thanks!
-
GodDragon
- Explorer At Heart

- Posts: 795
- Joined: Sun Jun 11, 2017 4:30 pm
- Gender: Male
- Sexual Orientation: Straight
- I am a: Switch
Re: [Tease Program] Tease-AI Java (1.2.2)
Some news on the Text To Speech end:
We don't want to port the original TTS from TAI but I have found a way to use google translate which sounds pretty similar to the original TTS (also supports different accents). Since that voice is still very robotic I have digged deeper and after looking into payed services such as google duplex, amazon polly and other futuristic TTS services I have found a way to generate realistic voices using an open source library with no additional cost money wise.
It will take some time and hardware power, like 5 seconds to render a sentence in my case however we could hide that behind the typing speed.
Here are some examples:
https://mega.nz/folder/PzYQla7B#vC2bkTbvUEN4E1OWNVfBMQ
Imo they sound great and it would actually convince me to use TTS myself. However the installation for that will obviously be voluntary because it is quite troublesome. I will try to create a good tutorial and setup which should work for most people. But it's not gonna be quick and easy as downloading 2 things and being done. So what do you think? Do you think those recordings sound good? Would you actually use it even if it was like 20-30 minutes of work to set it up? In the best case it might be done within like 5-10 minutes but I cannot gurantee for it sadly.
We don't want to port the original TTS from TAI but I have found a way to use google translate which sounds pretty similar to the original TTS (also supports different accents). Since that voice is still very robotic I have digged deeper and after looking into payed services such as google duplex, amazon polly and other futuristic TTS services I have found a way to generate realistic voices using an open source library with no additional cost money wise.
It will take some time and hardware power, like 5 seconds to render a sentence in my case however we could hide that behind the typing speed.
Here are some examples:
https://mega.nz/folder/PzYQla7B#vC2bkTbvUEN4E1OWNVfBMQ
Imo they sound great and it would actually convince me to use TTS myself. However the installation for that will obviously be voluntary because it is quite troublesome. I will try to create a good tutorial and setup which should work for most people. But it's not gonna be quick and easy as downloading 2 things and being done. So what do you think? Do you think those recordings sound good? Would you actually use it even if it was like 20-30 minutes of work to set it up? In the best case it might be done within like 5-10 minutes but I cannot gurantee for it sadly.
-
swirly
- Curious Newbie

- Posts: 2
- Joined: Fri May 22, 2020 10:43 pm
- Gender: Male
- Sexual Orientation: Straight
Re: [Tease Program] Tease-AI Java (1.2.2)
Hey folks,
I'm a developer, and I've been playing around with TAIJ for a little bit. I've come across a couple of bugs, and was wondering if you guys had somewhere you've been tracking issues? I checked the github for the project, but there didn't seem to be anything there.
I'm using TeaseAI Java v1.2.2 with Mischevious v1.2.0
One issue I've noticed is that the metronome doesn't seem to work when using the Mischevious personality, until you get to the code in End_1.js. It will suddenly kick in once you get there and startStroking is called with the value 220. I thought that it was a bug in the JS code for that personality where the BPM wasn't getting floored properly when calling startStroking, but I patched it locally and it didn't fix the issue. Here's the relevant chunk of the log:
I traced it back to where the logging call is made, and it's being logged at . That makes me think that there's a problem with the way that data is being passed from the personality code to the main program, but that only makes sense if I'm not the only one getting this problem ;)
Anyway, is there any issue tracking set up for this kind of thing?
-- swirly
I'm a developer, and I've been playing around with TAIJ for a little bit. I've come across a couple of bugs, and was wondering if you guys had somewhere you've been tracking issues? I checked the github for the project, but there didn't seem to be anything there.
I'm using TeaseAI Java v1.2.2 with Mischevious v1.2.0
One issue I've noticed is that the metronome doesn't seem to work when using the Mischevious personality, until you get to the code in End_1.js. It will suddenly kick in once you get there and startStroking is called with the value 220. I thought that it was a bug in the JS code for that personality where the BPM wasn't getting floored properly when calling startStroking, but I patched it locally and it didn't fix the issue. Here's the relevant chunk of the log:
Code: Select all
07:56:13 PM CHAT: Info: Starting session
07:56:14 PM CHAT: Info: IWasJustThinkingAboutYou: Beginning
07:56:18 PM CHAT: 07:56 PM Leah: I was just thinking about you swirly
07:56:31 PM CHAT: 07:56 PM Leah: Your pecker must have sensed I'm feeling a little wicked this afternoon
07:56:43 PM CHAT: 07:56 PM Leah: In fact, I'm feeling so wicked
07:56:55 PM CHAT: 07:56 PM Leah: That the only thing that's going to satisfy me is making you suffer *smiles innocently*
07:57:09 PM CHAT: 07:57 PM Leah: So why don't you wrap your hand around that poor leaky cock
07:57:14 PM CHAT: Info: calculated speed 146.5174128749531
07:57:15 PM CHAT: Info: calculated duration 209.82958720680003
07:57:25 PM CHAT: 07:57 PM Leah: Hold down the skin of your frustrated dick and stroke the tip with the other hand with lube
07:57:25 PM SEVERE: startStroking called with invalid args:[146.0]
07:57:34 PM CHAT: Info: ShowTeaseImage: Beginning
07:57:34 PM CHAT: Info: GetTeasePicture: Beginning
07:57:34 PM CHAT: Info: GetTeasePicture: Debug 2
07:57:35 PM CHAT: Info: GetTeasePicture: End
07:57:35 PM CHAT: Info: ShowTeaseImage: End
07:57:37 PM CHAT: 07:57 PM Leah: Don't mind me xD
Code: Select all
teaseai/api/scripts/nashorn/StartStrokingFunction.java:43Anyway, is there any issue tracking set up for this kind of thing?
-- swirly
-
Triple Alfa
- Explorer At Heart

- Posts: 175
- Joined: Wed Dec 05, 2007 12:35 pm
Re: [Tease Program] Tease-AI Java (1.2.2)
I'm getting a TypeError and I don't understand why:
Log snippet:
This is referring to:
Which refers to an array created by:
The offending code is called by:
Which in turn is called by:
Log snippet:
Code: Select all
11:35:36 am SEVERE: Latest loaded file was 'D:\Temp ICO\Teases\Tease AI Java\TeaseAI Java 1.2.2\Personalities\Amelie\Modules\Special\FirstSessionTeasing.js' and error was found in line 36
Error: TypeError: allActiveTeaseCategories.includes is not a function in <eval> at line number 36
javax.script.ScriptException: TypeError: allActiveTeaseCategories.includes is not a function in <eval> at line number 36
at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:477)
at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:461)
at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:413)
at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:409)
at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:157)
at java.scripting/javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:249)
at me.goddragon.teaseai.api.scripts.ScriptHandler.runScript(ScriptHandler.java:191)
at me.goddragon.teaseai.api.scripts.ScriptHandler.evalScript(ScriptHandler.java:172)
at me.goddragon.teaseai.api.scripts.nashorn.RunFunction.call(RunFunction.java:30)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.linker.JSObjectLinker.jsObjectScopeCall(JSObjectLinker.java:254)
at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$16$\^eval\_.:program(<eval>:23)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:655)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:513)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:527)
at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:456)
at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:413)
at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:409)
at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:157)
at java.scripting/javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:249)
at me.goddragon.teaseai.api.scripts.ScriptHandler.runScript(ScriptHandler.java:191)
at me.goddragon.teaseai.api.scripts.ScriptHandler.evalScript(ScriptHandler.java:172)
at me.goddragon.teaseai.api.scripts.nashorn.RunFunction.call(RunFunction.java:30)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.linker.JSObjectLinker.jsObjectScopeCall(JSObjectLinker.java:254)
at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$7$\^eval\_.:scopeCall(<eval>)
at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$7$\^eval\_.:program(<eval>:13)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:655)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:513)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:527)
at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:456)
at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:413)
at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:409)
at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:157)
at java.scripting/javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:249)
at me.goddragon.teaseai.api.scripts.ScriptHandler.runScript(ScriptHandler.java:191)
at me.goddragon.teaseai.api.scripts.ScriptHandler.startPersonality(ScriptHandler.java:145)
at me.goddragon.teaseai.api.scripts.ScriptHandler.startPersonality(ScriptHandler.java:125)
at me.goddragon.teaseai.api.session.Session$1.run(Session.java:43)
Caused by: <eval>:36 TypeError: allActiveTeaseCategories.includes is not a function
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ECMAErrors.error(ECMAErrors.java:57)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:213)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:185)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:172)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.Undefined.lookup(Undefined.java:100)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.linker.NashornLinker.getGuardedInvocation(NashornLinker.java:106)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.linker.NashornLinker.getGuardedInvocation(NashornLinker.java:96)
at jdk.dynalink/jdk.dynalink.linker.support.CompositeTypeBasedGuardingDynamicLinker.getGuardedInvocation(CompositeTypeBasedGuardingDynamicLinker.java:161)
at jdk.dynalink/jdk.dynalink.linker.support.CompositeGuardingDynamicLinker.getGuardedInvocation(CompositeGuardingDynamicLinker.java:109)
at jdk.dynalink/jdk.dynalink.LinkerServicesImpl.lambda$getGuardedInvocation$0(LinkerServicesImpl.java:137)
at jdk.dynalink/jdk.dynalink.LinkerServicesImpl.getWithLookupInternal(LinkerServicesImpl.java:168)
at jdk.dynalink/jdk.dynalink.LinkerServicesImpl.getGuardedInvocation(LinkerServicesImpl.java:135)
at jdk.dynalink/jdk.dynalink.DynamicLinker.relink(DynamicLinker.java:242)
at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$Recompilation$34$1231A$\^eval\_.isActiveTeaseCategory(<eval>:36)
at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$Recompilation$33$1337A$\^eval\_.randomActiveTeaseCategory(<eval>:43)
at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$24$\^eval\_.:program(<eval>:469)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:655)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:513)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:527)
at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:456)
... 35 moreCode: Select all
function isActiveTeaseCategory(category) {
return allActiveTeaseCategories.includes(category);
}Code: Select all
function collectAllActiveTeaseImages(){
let allFolders = ["Anal", "Asses", "Assjobs", "Blowjobs", "Boobjobs", "Boobs", "CBT", "Feet", "Femdom", "Footjobs", "Fucking", "Futa", "Handjobs", "Other", "POV", "Ruined Orgasms", "Thighjobs", "Thighs", "Traps"];
const allActiveTeaseCategories = [];
let i = 0;
let imageCat;
let imageCatUS;
let imageVar;
for (i = 0; i < allFolders.length; i++){
imageCat = allFolders[i];
imageCatUS = imageCat.replace(/\s/g, "_");
imageVar = "IMAGES_" + imageCatUS.toUpperCase();
if (getVar(VARIABLE[imageVar])){
allActiveTeaseCategories.push(imageCat);
}
}
let activeFolderName;
let activeFolder;
let fileList = [];
for (i = 0; i < allActiveTeaseCategories.length; i++){
activeFolderName = allActiveTeaseCategories[i];
activeFolder = getImageSubFolder(activeFolderName);
fileList = TAJFileUtils.getMatchingFiles(activeFolder + "\\*.*");
let x = 0;
for (x = 0; x < fileList.length; x++){
allActiveTeaseImages.push(fileList[x]);
}
}
}Code: Select all
function randomActiveTeaseCategory(categoryArray) {
let activeCategories = [];
let i;
for (i = 0; i < categoryArray.length; i++){
if(isActiveTeaseCategory(categoryArray[i])){
activeCategories.push(categoryArray[i]);
}
}
if (activeCategories.length > 0) {
let rnd = randomInteger(0, activeCategories.length - 1);
return activeCategories[rnd];
}else{
return null;
}
}Code: Select all
let categories = ["Asses", "Boobs", "Feet", "Thighs"];
let randomCategory = randomActiveTeaseCategory(categories);-
swirly
- Curious Newbie

- Posts: 2
- Joined: Fri May 22, 2020 10:43 pm
- Gender: Male
- Sexual Orientation: Straight
Re: [Tease Program] Tease-AI Java (1.2.2)
Just a disclaimer, I'm new to JS so I'm not super familiar with its scoping rules and nuances.Triple Alfa wrote: Sat May 23, 2020 9:59 am I'm getting a TypeError and I don't understand why:
Log snippet:This is referring to:Code: Select all
11:35:36 am SEVERE: Latest loaded file was 'D:\Temp ICO\Teases\Tease AI Java\TeaseAI Java 1.2.2\Personalities\Amelie\Modules\Special\FirstSessionTeasing.js' and error was found in line 36 Error: TypeError: allActiveTeaseCategories.includes is not a function in <eval> at line number 36 javax.script.ScriptException: TypeError: allActiveTeaseCategories.includes is not a function in <eval> at line number 36 at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:477) at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:461) <snip> at me.goddragon.teaseai.api.scripts.ScriptHandler.startPersonality(ScriptHandler.java:125) at me.goddragon.teaseai.api.session.Session$1.run(Session.java:43) Caused by: <eval>:36 TypeError: allActiveTeaseCategories.includes is not a function at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ECMAErrors.error(ECMAErrors.java:57) <snip> at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:527) at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:456) ... 35 moreWhich refers to an array created by:Code: Select all
function isActiveTeaseCategory(category) { return allActiveTeaseCategories.includes(category); }The offending code is called by:Code: Select all
function collectAllActiveTeaseImages(){ let allFolders = ["Anal", "Asses", "Assjobs", "Blowjobs", "Boobjobs", "Boobs", "CBT", "Feet", "Femdom", "Footjobs", "Fucking", "Futa", "Handjobs", "Other", "POV", "Ruined Orgasms", "Thighjobs", "Thighs", "Traps"]; const allActiveTeaseCategories = []; let i = 0; let imageCat; let imageCatUS; let imageVar; for (i = 0; i < allFolders.length; i++){ imageCat = allFolders[i]; imageCatUS = imageCat.replace(/\s/g, "_"); imageVar = "IMAGES_" + imageCatUS.toUpperCase(); if (getVar(VARIABLE[imageVar])){ allActiveTeaseCategories.push(imageCat); } } let activeFolderName; let activeFolder; let fileList = []; for (i = 0; i < allActiveTeaseCategories.length; i++){ activeFolderName = allActiveTeaseCategories[i]; activeFolder = getImageSubFolder(activeFolderName); fileList = TAJFileUtils.getMatchingFiles(activeFolder + "\\*.*"); let x = 0; for (x = 0; x < fileList.length; x++){ allActiveTeaseImages.push(fileList[x]); } } }<snip>Code: Select all
function randomActiveTeaseCategory(categoryArray) { let activeCategories = []; let i; for (i = 0; i < categoryArray.length; i++){ if(isActiveTeaseCategory(categoryArray[i])){ activeCategories.push(categoryArray[i]); } } if (activeCategories.length > 0) { let rnd = randomInteger(0, activeCategories.length - 1); return activeCategories[rnd]; }else{ return null; } }
I noticed that you're declaring the allActiveTeaseCategories array as
Code: Select all
function collectAllActiveTeaseImages(){
let allFolders = ["Anal", "Asses", "Assjobs", "Blowjobs", "Boobjobs", "Boobs", "CBT", "Feet", "Femdom", "Footjobs", "Fucking", "Futa", "Handjobs", "Other", "POV", "Ruined Orgasms", "Thighjobs", "Thighs", "Traps"];
const allActiveTeaseCategories = [];
...
}
Can you try declaring the array with let, and/or either making it global or passing it as an argument to isActiveTeaseCategory?
-
GodDragon
- Explorer At Heart

- Posts: 795
- Joined: Sun Jun 11, 2017 4:30 pm
- Gender: Male
- Sexual Orientation: Straight
- I am a: Switch
Re: [Tease Program] Tease-AI Java (1.2.2)
Yes the scope is definitely the issue here. You can't define a variable inside a function and reuse it in another. You need to put it into the global scope. I think "var" or just not giving it specification will make it global but that is considered bad practice in newer versions. So just move the var outside of your function and change its value inside your function.swirly wrote: Sat May 23, 2020 12:27 pmJust a disclaimer, I'm new to JS so I'm not super familiar with its scoping rules and nuances.Triple Alfa wrote: Sat May 23, 2020 9:59 am I'm getting a TypeError and I don't understand why:
Log snippet:This is referring to:Code: Select all
11:35:36 am SEVERE: Latest loaded file was 'D:\Temp ICO\Teases\Tease AI Java\TeaseAI Java 1.2.2\Personalities\Amelie\Modules\Special\FirstSessionTeasing.js' and error was found in line 36 Error: TypeError: allActiveTeaseCategories.includes is not a function in <eval> at line number 36 javax.script.ScriptException: TypeError: allActiveTeaseCategories.includes is not a function in <eval> at line number 36 at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:477) at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:461) <snip> at me.goddragon.teaseai.api.scripts.ScriptHandler.startPersonality(ScriptHandler.java:125) at me.goddragon.teaseai.api.session.Session$1.run(Session.java:43) Caused by: <eval>:36 TypeError: allActiveTeaseCategories.includes is not a function at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ECMAErrors.error(ECMAErrors.java:57) <snip> at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:527) at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:456) ... 35 moreWhich refers to an array created by:Code: Select all
function isActiveTeaseCategory(category) { return allActiveTeaseCategories.includes(category); }The offending code is called by:Code: Select all
function collectAllActiveTeaseImages(){ let allFolders = ["Anal", "Asses", "Assjobs", "Blowjobs", "Boobjobs", "Boobs", "CBT", "Feet", "Femdom", "Footjobs", "Fucking", "Futa", "Handjobs", "Other", "POV", "Ruined Orgasms", "Thighjobs", "Thighs", "Traps"]; const allActiveTeaseCategories = []; let i = 0; let imageCat; let imageCatUS; let imageVar; for (i = 0; i < allFolders.length; i++){ imageCat = allFolders[i]; imageCatUS = imageCat.replace(/\s/g, "_"); imageVar = "IMAGES_" + imageCatUS.toUpperCase(); if (getVar(VARIABLE[imageVar])){ allActiveTeaseCategories.push(imageCat); } } let activeFolderName; let activeFolder; let fileList = []; for (i = 0; i < allActiveTeaseCategories.length; i++){ activeFolderName = allActiveTeaseCategories[i]; activeFolder = getImageSubFolder(activeFolderName); fileList = TAJFileUtils.getMatchingFiles(activeFolder + "\\*.*"); let x = 0; for (x = 0; x < fileList.length; x++){ allActiveTeaseImages.push(fileList[x]); } } }<snip>Code: Select all
function randomActiveTeaseCategory(categoryArray) { let activeCategories = []; let i; for (i = 0; i < categoryArray.length; i++){ if(isActiveTeaseCategory(categoryArray[i])){ activeCategories.push(categoryArray[i]); } } if (activeCategories.length > 0) { let rnd = randomInteger(0, activeCategories.length - 1); return activeCategories[rnd]; }else{ return null; } }
I noticed that you're declaring the allActiveTeaseCategories array aswhich has 2 potential issues. 1) allActiveTeaseCategories is defined within the scope of thefunction block of collectAllActiveTeaseImages, so may not be accessible from isActiveTeaseCategory(), and 2) is declared as a const array, but you're calling allActiveTeaseCategories.push(imageCat). I don't know if that's allowed, since I would think that pushing to an array would mutate it.Code: Select all
function collectAllActiveTeaseImages(){ let allFolders = ["Anal", "Asses", "Assjobs", "Blowjobs", "Boobjobs", "Boobs", "CBT", "Feet", "Femdom", "Footjobs", "Fucking", "Futa", "Handjobs", "Other", "POV", "Ruined Orgasms", "Thighjobs", "Thighs", "Traps"]; const allActiveTeaseCategories = []; ... }
Can you try declaring the array with let, and/or either making it global or passing it as an argument to isActiveTeaseCategory?
Since pushing does change the state of the object but does not reassign the value it is fine. Const is the same as final in other languages such as java.
