| SexScripts : Saving to data.properties with wildcards? - https://ss.deviatenow.com:443/viewtopic.php?f=4&t=535 | Page 1 of 1 |
Saving to data.properties with wildcards? |
Banjo [ Mon Sep 14, 2015 11:03 am ] |
|---|---|
Is it possible to set multiple values at once in data.properties? That is, instead of having to do: Code: save("myscript.myvalue1", true) save("myscript.myvalue2", true) save("myscript.myvalue3", true) ... to instead do something like: Code: save("myscript.myvalue"+*+"", true) ... where * is whatever the wildcard character might be? |
|
Re: Saving to data.properties with wildcards? |
Liz [ Mon Sep 14, 2015 12:19 pm ] |
|---|---|
Don't think you can but you could do: Code: for (i in 1..4) {
save("myscript.myvalue"+i, true) } |
|
Re: Saving to data.properties with wildcards? |
doti [ Mon Sep 14, 2015 6:35 pm ] |
|---|---|
Yes, no wildcard with save() nor send() |
|
Re: Saving to data.properties with wildcards? |
doti [ Fri Dec 22, 2017 12:40 pm ] |
|---|---|
Notice : this will somewhat change with API 8 in a few weeks. |
|
Re: Saving to data.properties with wildcards? |
doti [ Mon Jan 01, 2018 9:39 pm ] |
|---|---|
Hello It was added to the SexScripts API ! Here is the sample code about the example above: Old: Code: save("myscript.myvalue1", true) save("myscript.myvalue2", false) save("myscript.myvalue3", true) ... v2 = loadBoolean("myscript.myvalue2") show(v2) New - saving a full list of booleans then reading back the whole list: Code: save("myscript.myvalues", [true, false, true]) ... values = load("myscript.myvalues") show(values[1]) (works also with send() / receive()) Enjoy ! |
|
Re: Saving to data.properties with wildcards? |
arthurb [ Tue Jan 02, 2018 3:30 pm ] |
|---|---|
Thanks, very useful too |
|
| Page 1 of 1 | All times are UTC + 1 hour [ DST ] |