Author Topic: Newb coding, my 1st attempt at a trigger, please help  (Read 2954 times)

Tags:
  • All members
  • Posts: 32
  • Karma: +0/-0
I have the line

IF(mystartbank-test_funds>cutoff,test_balance)

In a "set user variable" trigger called "mystartbank"

If I understand the syntax correctly this should test to see if "mystartbank - test_funds is greater than "cutoff" and if true then set "mystartbank" to the value of "test_balance"

Is that correct?

The reason I ask is in the View variables window I have mystartbank coming up correctly then changing to
IF(IF10000.00>IF(IF(10000.00 and that repeats into infinity

any ideas?

  • All members
  • Posts: 65
  • Karma: +1/-0
Re: Newb coding, my 1st attempt at a trigger, please help
« Reply #1 on: 25 Oct 2010, 19:31 »
I'm sure there are many more able forumites, but it looks to me as though you need to provide an option in case the statement isn't true. i.e.
IF(mystartbank-test_funds>cutoff, test_balance, mystartbank)
Also "cutoff" needs to be defined before the check is made.
Lastly that tick box "individually for each market" in the set user variable, can create havoc if not fully understood.
Good luck


  • All members
  • Posts: 32
  • Karma: +0/-0
Re: Newb coding, my 1st attempt at a trigger, please help
« Reply #2 on: 26 Oct 2010, 06:08 »
that was what I did initially, I thought it had to be like that, but when it didn't work i tried it without, it behaves exactly the same

  • All members
  • Posts: 124
  • Karma: +3/-0
Re: Newb coding, my 1st attempt at a trigger, please help
« Reply #3 on: 26 Oct 2010, 08:49 »
Hi there,
You have to "initialise" your user variable before you can include it in a formula...especially one where it refers to itself.

See the Manual section on Triggered Betting>Trigger Variables>User Variables & Working with User Variables

OT
If you lose...don't lose the lesson!

  • All members
  • Posts: 32
  • Karma: +0/-0
Re: Newb coding, my 1st attempt at a trigger, please help
« Reply #4 on: 26 Oct 2010, 16:45 »
thanks for the help, I had the variables initialized

I did something today, although i have to confess I'm unsure what it was.....Anyway its working better than it was, a few more tweaks to do