Month and Year as changeable variables not working.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #57544 quote
    Vonasi
    Moderator
    Master

    I have the following code in an indicator that I am working on:

    StartMonth = 1
    StartYear = 1997
    
    IF OpenYear = StartYear and OpenMonth = StartMonth THEN
    Flag = 1
    ENDIF
    

    and it works just fine – but if I // out the StartMonth and StartYear variables and set them as changeable integer variables then the code does not work. DrawText of them in the indicator shows 1 and 1,997 .

    I’m a little baffled as to why it does not work. Any ideas?

    Edit…….cancel that. Please ignore this post as it is the result of drinking beer while coding!

    #57546 quote
    GraHal
    Participant
    Master

    hahahahah Vonasi nice one!!! I like it when we get humour thrown in!!!! 🙂

    I get similar problems … but usually from having one eye on the tv!

    Enjoy Your Beer
    GraHal

    #57556 quote
    Vonasi
    Moderator
    Master

    Yes it is incredible how a code will suddenly start working if you type the right numbers in the right places.

    #57561 quote
    JC_Bywan
    Moderator
    Master

    Welcome to Pub-RealCode, beware of one of the most costly mistakes: trying to round a number in the code with the wrong number of decimals, finding the bug out, and shouting happily to the crowd “it’s my round!!!”

    #57565 quote
    Vonasi
    Moderator
    Master

    “it’s my round!!!”

    Not something you hear very much at today’s beer prices.

    Now when I was a student and beer was £1 a pint it was another matter. Afternoons at college were always much more fun after a lunchtime ‘quick one’…. or two or three.  ‘Isn’t it your round?’ was said an awful lot back then. Now you are more likely to hear ‘ We’ll just get our own shall we?’ or ‘Should we just get a quick cafe latte?’

    #57573 quote
    GraHal
    Participant
    Master

    I prefer to … have warm-up drinks at your place and then hit the club direct with our feet dancing! 🙂

    I remember when a pint of beer was 1/10 … in old money … but I’m not sure how to even write it now! 🙂 (1s – 10d??)

    #57575 quote
    Vonasi
    Moderator
    Master

    I prefer to … have warm-up drinks at your place and then hit the club direct with our feet dancing! 🙂 I remember when a pint of beer was 1/10 … in old money … but I’m not sure how to even write it now! 🙂 (1s – 10d??)

    Despite your onset of dementia your avatar does you great credit for a man of your years. You must tell me what it was like during The Great War one day.

    #57596 quote
    robertogozzi
    Moderator
    Master

    I am always delighted by (english) humor, but isn’t ProBuilder support a bit off topic for the Great War?

    #57605 quote
    Vonasi
    Moderator
    Master

    I am always delighted by (english) humor, but isn’t ProBuilder support a bit off topic for the Great War?

    Sorry. My fault. I won’t drink and programme ever again. (that might not be completely actually factual).

    Maybe ProRealCode needs another forum where we can all go to talk rubbish?

    Subject closed…… I’m off to the pub.

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.

Month and Year as changeable variables not working.


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Vonasi @vonasi Moderator
Summary

This topic contains 8 replies,
has 4 voices, and was last updated by Vonasi
8 years, 1 month ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 01/06/2018
Status: Active
Attachments: No files
Logo Logo
Loading...