de en es fr
Let the machine help
Light teasing, exhibition, BDSM, sissyfication, watersports... with sounds and pictures


Post new topic Reply to topic  [ 4 posts ] 
Author Message
 reading a variable from another file (solved)
PostPosted: Thu Aug 05, 2021 11:27 pm 
Offline
Shy
I'm learning to write using Groovy and I'm trying to make a script where there's an introductory part, which is in another script and there I define several variables. But in the main script I wanted to be able to use them, for example, for conditions of an event to happen or not. I've already looked but couldn't find it, not even by the method of reading a file that says in the manual.

For example, in a script I ask the person's weight and then I define the variable weight = y, where y is the value that was entered, but in the main script I want to put that if the person has a weight > 70, they must do an action x. So I would need to call this variable to my main script.


Last edited by submicha1 on Sat Aug 07, 2021 2:54 am, edited 1 time in total.

Top
 Profile Send private message 
 
 Re: Is there any way to read the variable from another file?
PostPosted: Fri Aug 06, 2021 3:03 pm 
Offline
Veteran
Put in the script before you use it:
int weight = (loadInteger("OtherScript.y"))

Be sure to have saved the value in the other script:
save("OtherScript.y",y)


Top
 Profile Send private message 
 
 Re: Is there any way to read the variable from another file?
PostPosted: Sat Aug 07, 2021 2:53 am 
Offline
Shy
martlb wrote:
Put in the script before you use it:
int weight = (loadInteger("OtherScript.y"))

Be sure to have saved the value in the other script:
save("OtherScript.y",y)



Thank you very much, it worked here :D


Top
 Profile Send private message 
 
 Re: reading a variable from another file (solved)
PostPosted: Wed Aug 25, 2021 5:18 pm 
Offline
Site Admin
User avatar
Thanks marlb.
For a bigger explanation : variable saved by save and read by loadXXX are save in a common file, data.properties, in the root folder of SexScripts. Every script search in this same file.


Top
 Profile Send private message 
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Maroon Fusion theme created by Oxydo
Software, theme modifications, phpBB modification by Doti 2010 - 2020
This website uses session cookies only.