Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to update variable's values in sequence of several commands #4

Open
nerevar opened this issue Jul 29, 2012 · 1 comment
Open

Comments

@nerevar
Copy link
Owner

nerevar commented Jul 29, 2012

JMC does not use new changed variable's value:

Example:

#var target 1
#var target 2;#show output - $target
output - 1
#var temp 1
#var temp 2;#var temp 3;#show "Temp is $temp"
"Temp is 1"

Now, if you want to get exact value of variable, you can use JavaScript:

[#var gameme]
{gameme}={0}

[#scr {jmc.Setvar("gameme", "1");};#scr {jmc.Setvar("gameme", "3");jmc.showme(jmc.GetVar("gameme"))}]
3
@nerevar
Copy link
Owner Author

nerevar commented Jul 29, 2012

You need to use curly brackets to get new value of variables

[#message variable ON]
[#var temp 1]
#   $temp теперь установлено в  {1} [local]

[#var temp 2;#show Temp is $temp;#show {Temp is $temp}]
#   $temp теперь установлено в  {2} [local]
Temp is 1
Temp is 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant