none
Small Basic 1.3 - "I was expecting a number constant but this one has a problem: it's too big or small, or has a wrong format." RRS feed

  • Question

  • Hello,

    When I try to run my program (which was working OK on v 1.2) on Small Basic 1.3, I get the following errors:

    GraphicsWindow.Width = 0.99 * Desktop.Width
    => I was expecting a number constant but this one has a problem: it's too big or small, or has a wrong format.

    GraphicsWindow.Height = 0.91 * Desktop.Height
    => I was expecting a number constant but this one has a problem: it's too big or small, or has a wrong format.

    GraphicsWindow.DrawResizedImage(RépertoireImages + "Logo PSU.png", GraphicsWindow.Width - 1.2 * LargeurDuLogo, HauteurDuLogo/5, LargeurDuLogo, HauteurDuLogo)
    => I was expecting a number constant but this one has a problem: it's too big or small, or has a wrong format.

    BoutonEnClasse_x1 = GraphicsWindow.Width/2 - 1.7 * LargeurDuBoutonMode
    => I was expecting a number constant but this one has a problem: it's too big or small, or has a wrong format.

    Etc.

    How can I fix this?

    Thanks.

    J.

    Sunday, September 3, 2017 9:01 AM

Answers

  • John Doe 1960,

    Just tried your program as shown above and for me it runs OK on Small Basic 1.3. I'm configured in English. So, you might want to try that and see if it works for you then.


    JR

    Monday, September 4, 2017 12:01 AM
    Answerer

All replies

  • Hi John,

    Small Basic 1.3 May Have Some Bugs As It Has Been Released Only For Windows 10,It Is Available In The Windows Store Only , When It Is Updated To The Download Centre ,We Can Use Small Basic 1.3 For Windows 7 and Above.

    You Could Try Reinstalling It.

    Can You Mention What The Following Variables Stand For?

    RépertoireImages , LargeurDuLogo , HauteurDuLogo , LargeurDuBoutonMode 

    This Forum Is Related To Small Basic 1.3 = https://social.msdn.microsoft.com/Forums/office/en-US/32cead41-334f-4f6b-8435-b2451b266c78/lets-find-whats-new-in-small-basic-13?forum=smallbasic

    Thanks,




    Sunday, September 3, 2017 9:30 AM
  • Due to to french text in your variable names, I expect you to use the continental way of writing numbers (3,1414 in stead of 3.1414). You should find the solution of of your problem in that direction. In the LitDev extension are some functions to help with that, but I don't know if that is already working in SB 1.3

    Jan [ WhTurner ] The Netherlands


    Sunday, September 3, 2017 9:40 AM
    Answerer
  • Hi,

    Extensions (for example LD Extension) cannot Be Used Using Small Basic 1.3

    Thanks,

    Sunday, September 3, 2017 9:46 AM
  • Thanks for your answers.

    Uninstalling Small Basic 1.3 (and 1.2), rebooting the system (Windows 10) and reinstalling Small Basic 1.3 does not solve the problem.

    Changing the decimal separator does not solve the problem either.

    J.

    PS: I run Windows 10.



    Sunday, September 3, 2017 11:01 AM
  • Still the error message points to position 24 in line 3 which is the start of the number 0.99 Did you try 0,99 ? Does this give the same error?

    Gives  GraphicsWindow.Width = Desktop.Width / 2 , without any decimal separator the same error ?


    Jan [ WhTurner ] The Netherlands


    Sunday, September 3, 2017 1:08 PM
    Answerer
  • Thanks for your help.

    Small Basic 1.3 does not seem to understand when I use a comma as a decimal separator:

    It's OK to divide a variable by 2 but not by 1.5:

    I also tried without spaces. It doesn't change anything:

    J.

    Sunday, September 3, 2017 4:00 PM
  • I can't try SB 1.3 but one thing you can try, is put the 0.99 in a variable:

    const=0.99

    GWW=Desktop.Width*const


    Jan [ WhTurner ] The Netherlands

    Sunday, September 3, 2017 4:19 PM
    Answerer

  • (Running the same program on Small Basic 1.2 on the same computer does not generate any error.)

    J.

    Sunday, September 3, 2017 4:38 PM
  • John Doe 1960,

    Just tried your program as shown above and for me it runs OK on Small Basic 1.3. I'm configured in English. So, you might want to try that and see if it works for you then.


    JR

    Monday, September 4, 2017 12:01 AM
    Answerer