Author Topic: Muilti @if@ statment  (Read 871 times)

0 Members and 1 Guest are viewing this topic.

lowercase

  • Youngling
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
  • Twitch Name: lowercasegaming
Muilti @if@ statment
« on: August 29, 2016, 04:43:31 AM »
Trying to set it up so on if can call for multiple inputs to save space in my commands list, it would be a pain in the ass to run 3x3x4 commands because i cant call for 2 functions

(main)
@if@[@target@||1||@savefile@[bob.txt,@rand@[0|100]]@exec@[10,!chain1]action callback||Invalid entry]

Want to add @target@||2|| and 3 respectively

(chain1)
@if@[<=||@readfile@[bob.txt]||@readfile@[threshold.txt]||won@savefile@[bob.txt]||failed@savefile@[bob.txt]]

(boost)
@savefile@[bob.txt,@calc@[+|@readfile@[bob.txt]|@rand@[0|10]]]

lowercase

  • Youngling
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
  • Twitch Name: lowercasegaming
Re: Muilti @if@ statment
« Reply #1 on: August 29, 2016, 02:17:41 PM »
found out, for mulitple @if@ statments you can set it to @if@[ (DATA) || (MATCH) || (DO) || @If@[ (DATA) || (OR) || (DO) || (DONT/MORE OR)]]

its best to write it all out first then change it into its final form so you dont lost brackets

@if@[ (DATA) || (MATCH1) || (DO) || (DONT) ]
@if@[ (DATA) || (MATCH2) || (DO) || (DONT) ]
@if@[ (DATA) || (MATCH3) || (DO) || (DONT) ]

to

@if@[ (DATA) || (MATCH1) || (DO) || @if@[ (DATA) || (MATCH2) || (DO) ||@if@[ (DATA) || (MATCH3) || (DO) || (DONT) ]]]