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

[BUG] Set State problem #78

Open
dDeedev opened this issue Aug 18, 2023 · 0 comments
Open

[BUG] Set State problem #78

dDeedev opened this issue Aug 18, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@dDeedev
Copy link
Member

dDeedev commented Aug 18, 2023

When ever call meta.Set{something} it will set new value only of action is done.
Which mean on this action

{
  "name": "attend_exhibition",
  "desc": "Attend partner exhibition",
  "disable": false,
  "when": "meta.GetBoolean(params['exhibition'].GetString()) == false",
  "then": [
    "meta.SetFloat('points', meta.GetFloat('points') + 50.0)",
    "meta.SetBoolean(params['exhibition'].GetString(), true)",
    "meta.SetNumber('exhibition_count', meta.GetNumber('exhibition_count') + 1)",
    "booth_count = meta.GetNumber('exhibition_count')",
    "max_booth = Max(booth_count-2.0,0.0)",
    "max_minor = Max(meta.GetFloat('minor_count')-5.0,max_booth)",
    "meta.SetFloat('minor_count', meta.GetFloat('minor_count')+Abs(max_minor))"
  ],
  "allowed_actioner": "ALLOWED_ACTIONER_ALL",
  "params": [
    {
      "name": "exhibition",
      "desc": "exhibition attribute",
      "data_type": "string",
      "required": true,
      "default_value": ""
    }
  ]
}

this line will "meta.SetNumber('exhibition_count', meta.GetNumber('exhibition_count') + 1)" not set to block immediately but will be update after block finish and minor_count will not + 1 when current state is 2 and will be 3 after this action

@dDeedev dDeedev added the bug Something isn't working label Aug 18, 2023
@dDeedev dDeedev self-assigned this Aug 18, 2023
@dDeedev dDeedev changed the title Set State problem [BUG] Set State problem Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant