Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

compilation error: Rainbow

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR
View previous topic :: View next topic  
Author Message
Ev3658

Bascom Member



Joined: 30 Nov 2014
Posts: 32

russia.gif
PostPosted: Mon Nov 29, 2021 9:14 pm    Post subject: compilation error: Rainbow Reply with quote

Doesn't compile the example.
Microcontroller: m128def
Bascom version: 2.0.8.4

Compiler error:
Code:
Error : 303   Line :   42    #ELSE, #ELSEIF, OR #ENDIF without #IF  , in File ...


Used code:


Code:
$regfile = "m128def.dat"
$crystal = 16000000
$hwstack = 80
$swstack = 80
$framesize = 80

Config Rainbow = 1 , Rb0_len = 8 , Rb0_port = Portb , Rb0_pin = 3
'                                                   ^ connected to pin 0
'                                       ^------------ connected to portB
'                         ^-------------------------- 8 leds on stripe
'              ^------------------------------------- 1 channel


'Global Color-variables
Dim Color(3) as Byte
R alias Color(_base) : G alias Color(_base + 1) : B alias Color(_base + 2)

'CONST
const numLeds=8

'----[MAIN]---------------------------------------------------------------------
Dim n as Byte

RB_SelectChannel 0         ' select first channel
R = 50 : G = 0 : B = 100   ' define a color
RB_SetColor 0 , color(1)   ' update leds
RB_Send

Do
  For n = 1 to Numleds-1
    rb_Shiftright 0 , Numleds 'shift to the right all leds except the last one
    Waitms 100
    RB_Send
  Next
  For n = 1 to Numleds-1
    rb_Shiftleft 0 , Numleds   'shift to the left all leds except the last one
    Waitms 100
    RB_Send
  Next
  waitms 500                   'wait a bit
Loop
 

Initialization problem :oops:

(BASCOM-AVR version : 2.0.8.4 )
Back to top
View user's profile
EDC

Bascom Expert



Joined: 26 Mar 2014
Posts: 971

poland.gif
PostPosted: Mon Nov 29, 2021 9:46 pm    Post subject: Reply with quote

In my 2084 attached code compiles just fine. Maybe you open Rainbow library in Bascom without setting "Dont reformat extension LIB DAT RPT" then try to reinstal Bascom for overwrite the library or copy it from previous version.
Or maybe this is some "path" issue... I always use underscore instead of spaces.
Back to top
View user's profile Visit poster's website
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5921
Location: Holland

blank.gif
PostPosted: Mon Nov 29, 2021 9:52 pm    Post subject: Reply with quote

See also : https://www.mcselec.com/index2.php?option=com_forum&Itemid=59&page=viewtopic&t=14815&highlight=rainbow
_________________
Mark
Back to top
View user's profile Visit poster's website
Ev3658

Bascom Member



Joined: 30 Nov 2014
Posts: 32

russia.gif
PostPosted: Mon Nov 29, 2021 10:28 pm    Post subject: Reply with quote

Windows 10 is to blame for everything 99.9% Mad

I have been installing Bascom since 2016 and after upgrading to 2.0.8.4 on Windows 10, this is causing the glitches.
There was a glitch in the compiler, but after updating Windows 10 and reinstalling Bascom AVR, it disappeared. Now this issue with #ENDIF sure is also related to Windows 10 Embarassed

I beg your pardon, I will try now somehow by the method of a shaman and voodoo to conjure Rolling Eyes
Back to top
View user's profile
Ev3658

Bascom Member



Joined: 30 Nov 2014
Posts: 32

russia.gif
PostPosted: Tue Nov 30, 2021 2:00 pm    Post subject: Reply with quote

Glitch fixed via update 2.0.8.3
Launched with administrator rights 2.0.8.3
Launched the update
Installed in another folder "C: \ MCS \ BASCAVR2084-2"
On file 2.0.8.4 in Win10, set compatibility with Windows 7 + launch with administrator rights
Launched it and the error disappeared.
Thanks for Bascom AVR !!!! Thanks!
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5921
Location: Holland

blank.gif
PostPosted: Tue Nov 30, 2021 2:04 pm    Post subject: Reply with quote

i dont get it. i test each version in windows 10. and all samples are compiled. but yes, you need to install with admin rights. and the first run should be with admin rights too. after that you can use it as a normal user.
_________________
Mark
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum