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

finish_strategy_change Is it possible to cause a dead loop? #414

Open
jzy-chitong56 opened this issue Nov 10, 2024 · 0 comments
Open

finish_strategy_change Is it possible to cause a dead loop? #414

jzy-chitong56 opened this issue Nov 10, 2024 · 0 comments

Comments

@jzy-chitong56
Copy link
Contributor

jzy-chitong56 commented Nov 10, 2024

rp_strat There may be negative numbers present????
strategy_roll Always greater than 0

if strategy_roll <= sum then Negative numbers will never be greater than 0

and i should check max STRAT -- rp_strat_length

  loop
    set sum = sum + rp_strat[rp_strat_sort[i]]
    if strategy_roll <= sum then
      //if rp_strat[rp_strat_sort[i]] / Max(rp_strat[strategy], 1) > strategy_change_threshold then
      set strategy = rp_strat_sort[i]
      set chosen_strategy = strategy
      call SetChatVar("Strategy", GetCurrentStrategyName())
      //endif
      return
    endif
    set i = i + 1
  endloop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant