trying to add +1 or + $gameVariable.value() to this Yep script SwSfcall.

EDIt: ops
Edit repost:

Hello, related to the use of Yep SwSv plugin: http://www.yanfly.moe/wiki/Self_Switches_&_Variables_(YEP)#Download

1. Im trying to add +1 or + $gameVariable.value() to this Yep script SwSfcall. "this.setSelfVariableValue(x, y, z, value)"

So that it increases by 1. Im doing it from a common event.


current solution for me on problem
(event commands)control variables: x set : script: this.getSelfVariableValue(map, event, value)
then add or subtract on variable x and send new value back with YepSwSv plugin comand.

Does anybody know of a better way?
you should report the post to get a mod's attention. Threads aren't deleted though - normally you'd leave the question and just edit the post to add the solution, so others can be helped if they have the same issue.
@Martin I'm going to close this thread for you. Next time please leave the post and add the answer if you find it yourself. Then report it to be closed. Thank you.
Sorry, I edited and reposted. thanks
Nice. I think you could do it in a single step:

this.setSelfVariableValue(8, 10, 112, this.getSelfVariableValue(8, 10, 112) + x)

or

this.setSelfVariableValue(8, 10, 112, this.getSelfVariableValue(8, 10, 112) + $gameVariables.value(x))


where 8 is the map id, 10 is the event id, 112 is the self variable id, x is the fixed amount you want to add, or the id of the variable whose value you want to add (without leading zeros)

You might have to play with it a bit - can't remember if Yanfly's plugin will do that calculation at the end, or if you might need to remove any spaces from that 4th argument. Give it a go, and post back if it doesn't work.
(I obviously forgot to lock this, but seems there may be some more help available anyway.)
@Shaz Thank you! I had a go with it and it worked perfect for my need. Also saved me a ton of work!

You are amazing! <3

Original thread: https://forums.rpgmakerweb.com/threads/trying-to-add-1-or-gamevariable-value-to-this-yep-script-swsfcall.116912/