Author Topic: Condition is False, when clearly it is TRUE?  (Read 1807 times)

Tags:
  • All members
  • Posts: 314
Condition is False, when clearly it is TRUE?
« on: 10 Oct 2019, 11:50 »
Hi,

I am yet again frustrated by MFP..

As you will see by the image, I have a very simple trigger. A bet has alreay been placed, and the trigers action is to add the the selections name into the placedBets file. The image shows clearly, that Stefanos Tsitsipas is present in the placedBets file.

I have a further trigger, when the market settles, it writes an entry, to a winner text file, where the condition is that it wins, AND the selections name is present in the placedBets file...

As can clearly be seen, both of the conditions are true, Stefanos Tsitsipas won his match, AND, there was an entry in the placedBets file..

Yet, looking at the logs, it sees fine that he did win, allowing the process to continue, but when it checks to see if the selections name is i the file placedBets, somehow, MFP has this condition evaluating to false?...

I have looked at this a thousand times. The path to the file is correct, the placedBets does contain the value "Stefanos Tsitsipas", he did win, everything lines up - but, no entry is made, because MFP decides that the condition is false.

This has the effect that my variable, fibStart, has not been incremented, and consequently, tbets, has not been set to 0, as a result, the next bet will not take place, because tbets is set as 1, due to the last bet placed setting this value.

So, the consequence is catastrophic.

It can clearly be seen that what I have done is correct, yet MFP has failed?

If I have done something wrong here, slap me round the head with a wet kipper, but I don't think I have

  • All members
  • Posts: 347
Re: Condition is False, when clearly it is TRUE?
« Reply #1 on: 10 Oct 2019, 12:27 »
Condition works fine for me as you have done it... I just tested it..

You sure you got your encoding correct... ? UTF8?

  • All members
  • Posts: 314
Re: Condition is False, when clearly it is TRUE?
« Reply #2 on: 10 Oct 2019, 13:21 »
Thanks for your reply liltbrockie,

ha ha, yes, well, I elected to let MFP write the file. I deleted the initial one I created, which would have been an ANSI file, and then allowed MFP to create the new file on the first selection to be added. The result was a MFP file, which I assume will have UTF-8 encoding.

Well, whilst writing this, I put in a check in one of my apps, to see what the current encoding was, and as can be seen, its UTF-8

So it was UTF-8, but MFP decided the condition was false, and the selection was not present in the file that the write to file routine created...

I think there may be a nano bot just trying to annoy me, and its working, anybody know how to get rid of nano bots - pesky little things?


  • All members
  • Posts: 347
Re: Condition is False, when clearly it is TRUE?
« Reply #3 on: 10 Oct 2019, 14:13 »
That's ridiculous then.. I dunno why it's not working. Have you got re read file contents ticked.. if i needs to be?
Is the file definitely closed when MF is trying to read it?

  • All members
  • Posts: 314
Re: Condition is False, when clearly it is TRUE?
« Reply #4 on: 10 Oct 2019, 20:38 »
Yes, it was a bit ridiculous...

My solution?

I was seriously considering using excel to do this, because using this approach, I can take care and trust that my staking plan will work, because my application that I developed to do this, is 100% solid - BUT, using excel is painful to MFP because the life is choked through MFP's resource demand, due to excel use. So, for now, I will stick with the setup I have. I just wish that I could preserve the values in the constants, for the next days betting. I tried to use Remember last
value, but, upon closing MFP and restarting, the value always resets to the initial value set in the constants

Delete the existing file, and create a new one, and save with Unicode encoding. Worked like a charm. Madness!

I know when I create empty files in the morning, getting ready for the days horse racing selections I create, I always create a new file with Unicode encoding

Given that your attempt worked as you tested my setup, then I suspect something may be amiss on my machine - BUT, how do I test for this? I think for now, I will just use Unicode for everything, going forward. Not sure at what point I will install my OS to start again, but until then, it will be unicode.

Thanks for doing the test..

 

Please note, BetFair is seems to be currently OFFLINE