Parse Errors & Overloaded Functions

Trying to edit some styles using OS 7.15 and getting several errors that I’ve never seen before, including “type/value mismatch at argument…”, “parse error in template argument list”, and “cannot resolve overloaded function ‘StylePtr’ based on conversion to type ‘StyleFactory*’” among others.

Pastebin for the config file - LiamsOldBenTest - Pastebin.com

Pastebin for the entire error being thrown - OldBenTestErrors - Pastebin.com

The really strange thing is that I can paste the style into the ProffieOS Style Editor and it comes up fine. But Arduino says nope. I’ve searched quite a bit for any relevant posts but haven’t found anything that made sense as a resolution. Also, I’m not a developer but I’ve put together styles in the past, so if there’s an error in syntax somewhere, I’m sure not seeing it.

So, I’m not sure what the type mismatch error is about. Maybe a chevron <> mismatch, but it doesn’t look like anything’s obviously wrong in the config you shared and I can’t replicate it.

Pulling out this as the style though:

StylePtr<
	Layers<
		AudioFlicker<RotateColorsX<Variation,Rgb<48,48,225>>,RotateColorsX<Variation,Rgb<3,15,255>>>,
		Layers<
			AudioFlicker<RotateColorsX<Variation,Rgb<48,48,225>>,RotateColorsX<Variation,Rgb<3,15,255>>>,
			LockupTrL<
				Layers<
					AlphaL<
						Blinking<Green,Strobe<Chartreuse,SpringGreen,30,30>,60,500>,
						Bump<
							Scale<
								BladeAngle<5000,28000>,
								Scale<BladeAngle<8000,16000>,Int<3000>,Int<44000>>,
								Int<3000>
							>,
							Scale<SlowNoise<Int<3000>>,Int<8000>,Int<18000>>
						>
					>,
					AlphaL<
						Blinking<
							BrownNoiseFlicker<Green,GreenYellow,50>,
							BrownNoiseFlicker<GreenYellow,SpringGreen,50>,
							100,
							500
						>,
						Bump<
							Scale<
								BladeAngle<5000,28000>,
								Scale<BladeAngle<8000,16000>,Int<3000>,Int<44000>>,
								Int<3000>
							>,
							Int<18000>
						>
					>
				>,
				TrConcat<
					TrInstant,
					AlphaL<
						Blinking<Green,Strobe<BrownNoiseFlicker<GreenYellow,LemonChiffon,500>,Green,15,30>,60,500>,
						Bump<
							Scale<
								BladeAngle<5000,28000>,
								Scale<BladeAngle<8000,16000>,Int<3000>,Int<44000>>,
								Int<3000>
							>,
							Scale<SlowNoise<Int<3000>>,Int<25000>,Int<32000>>
						>
					>,
					TrFade<300>
				>,
				TrSmoothFade<300>,
				SaberBase::LOCKUP_NORMAL
			>,
			TransitionEffectL<
				TrConcat<
					TrInstant,
					AlphaL<
						Strobe<Chartreuse,Yellow,20,30>,
						Bump<
							Scale<
								BladeAngle<5000,28000>,
								Scale<BladeAngle<8000,16000>,Int<3000>,Int<44000>>,
								Int<3000>
							>,
							Int<15000>
						>
					>,
					TrFade<300>
				>,
				EFFECT_LOCKUP_BEGIN
			>,
			TransitionEffectL<
				TrConcat<
					TrInstant,
					HumpFlickerL<Strobe<AlphaL<Orange,Int<20000>>,DarkOrange,20,30>,30>,
					TrSmoothFade<250>
				>,
				EFFECT_LOCKUP_BEGIN
			>,
			TransitionEffectL<TrConcat<TrInstant,Orange,TrDelay<25>>,EFFECT_LOCKUP_BEGIN>,
			TransitionEffectL<
				TrConcat<
					TrInstant,
					Strobe<DarkOrange,Yellow,20,30>,
					TrFade<200>,
					BrownNoiseFlickerL<AlphaL<Yellow,Int<16000>>,Int<50>>,
					TrJoinR<TrWipe<200>,TrWipeIn<200>,TrFade<200>>
				>,
				EFFECT_LOCKUP_END
			>,
			ResponsiveLightningBlockL<
				Strobe<Rgb<95,0,185>,AudioFlicker<White,Azure>,50,1>,
				TrConcat<TrInstant,AlphaL<White,Bump<Int<12000>,Int<18000>>>,TrFade<200>>,
				TrConcat<TrInstant,HumpFlickerL<AlphaL<White,Int<16000>>,30>,TrSmoothFade<600>>
			>,
			AlphaL<DodgerBlue,Bump<Int<0>,Int<7000>>>,
			TransitionEffectL<
				TrConcat<
					TrInstant,
					Rgb<0,0,200>,
					TrDelay<25>,
					AlphaL<Rgb<10,0,0>,Int<0>>,
					TrWipeIn<300>,
					AlphaL<
						Stripes<5000,1000,Red,Rgb<180,0,0>,Rgb<128,0,0>,Rgb<84,0,0>,Rgb<42,0,0>,Rgb<16,0,0>>,
						SmoothStep<Int<28000>,Int<4500>>
					>,
					TrJoin<TrSmoothFade<900>,TrWipe<700>>
				>,
				EFFECT_STAB
			>,
			TransitionEffectL<
				TrConcat<
					TrInstant,
					Moccasin,
					TrDelay<25>,
					AlphaL<
						TransitionEffect<
							TransitionEffect<
								Strobe<DarkOrange,Moccasin,20,20>,
								BrownNoiseFlicker<DarkOrange,Yellow,300>,
								TrInstant,
								TrFade<300>,
								EFFECT_BLAST
							>,
							DarkOrange,
							TrInstant,
							TrDelay<150>,
							EFFECT_BLAST
						>,
						Bump<Scale<BladeAngle<>,Int<25000>,Int<8000>>,Int<18000>>
					>,
					TrFade<600>
				>,
				EFFECT_BLAST
			>,
			TransitionEffectL<
				TrConcat<
					TrInstant,
					Rgb<64,12,225>,
					TrDelay<25>,
					AlphaL<
						TransitionEffect<
							TransitionEffect<
								Strobe<Chartreuse,SpringGreen,20,20>,
								BrownNoiseFlicker<SpringGreen,GreenYellow,300>,
								TrInstant,
								TrFade<300>,
								EFFECT_CLASH
							>,
							GreenYellow,
							TrInstant,
							TrDelay<150>,
							EFFECT_CLASH
						>,
						Bump<Scale<BladeAngle<>,Int<25000>,Int<8000>>,Int<24000>>
					>,
					TrFade<600>
				>,
				EFFECT_CLASH
			>,
			TransitionEffectL<TrConcat<TrInstant,AudioFlickerL<White>,TrFade<800>>,EFFECT_IGNITION>,
			LockupTrL<
				AlphaL<BrownNoiseFlickerL<White,Int<300>>,SmoothStep<Int<30000>,Int<5000>>>,
				TrWipeIn<400>,
				TrFade<300>,
				SaberBase::LOCKUP_DRAG
			>,
			LockupTrL<
				AlphaL<Mix<TwistAngle<>,Red,Orange>,SmoothStep<Int<28000>,Int<5000>>>,
				TrWipeIn<600>,
				TrFade<300>,
				SaberBase::LOCKUP_MELT
			>,
			InOutTrL<TrWipeSparkTip<Cyan,350>,TrWipeInSparkTip<Cyan,900>>
		>,
		EffectSequence<
			EFFECT_POWERSAVE,
			AlphaL<Black,Int<8192>>,
			AlphaL<Black,Int<16384>>,
			AlphaL<Black,Int<24576>>,
			AlphaL<Black,Int<0>>
		>
	>
>()

I do see the following error compiling the style:

layers.h:41:58: error: ambiguous overload for 'operator<<' (operand types are 'SimpleColor' and 'SimpleColor')
41 |   auto getColor(int led) -> decltype(base_.getColor(led) << layer_.getColor(led)) {

Often this’ll happen when colors go into wrong places (there’s a few different expressions of a “color” with proffie styles, which complicate things in ways that the Style Editor doesn’t properly replicate, so it’s not surprising it works there).

@profezzorn Has a much better chance of knowing what’s up than I.

Often stuff like this happens whenever you’ve got a “transparent” base in the Layers, making the style have a transparent result, but that doesn’t look like the case here.

The “transparent base layer” issue was the only thing close to the situation that I could find in my search (I typically strive to not be “that guy” who doesn’t search before asking a question that’s been answered repeatedly), but after reviewing the code, I wasn’t noticing anything obvious to that end. A little relieved to see that I’m not “crazy” (per se…).

1 Like

This style seems to have to non-transparent layers on top of each other. (AudioFlicker, and a Layer, which starts with AudioFlicker<>) If you put one non-transparent layer on top of another, the first one is ignored, and pointless.

1 Like

Oh, I see, thanks! The opposite case didn’t even occur to me to look for.

I removed the first AudioFlicker line from both sections (blade and accent LED), but now it’s throwing another error -

In file included from E:\Documents\Sabers\Proffie\OWKE3\ProffieOS\ProffieOS.ino:621:
E:\Documents\Sabers\Proffie\OWKE3\ProffieOS\config\Old_Ben_test_2_config.h:78:133: error: expected primary-expression before ')' token
   78 |   EffectSequence<EFFECT_POWERSAVE,AlphaL<Black,Int<8192>>,AlphaL<Black,Int<16384>>,AlphaL<Black,Int<24576>>,AlphaL<Black,Int<0>>>>>(),
      |                                                                                                                                     ^
In file included from E:\Documents\Sabers\Proffie\OWKE3\ProffieOS\ProffieOS.ino:621:
E:\Documents\Sabers\Proffie\OWKE3\ProffieOS\config\Old_Ben_test_2_config.h:98:133: error: expected primary-expression before ')' token
   98 |   EffectSequence<EFFECT_POWERSAVE,AlphaL<Black,Int<8192>>,AlphaL<Black,Int<16384>>,AlphaL<Black,Int<24576>>,AlphaL<Black,Int<0>>>>>(),
      |                                                                                                                                     ^

exit status 1

Compilation error: expected primary-expression before ')' token

Config with deleted line(s) - LiamsOB1_TestB - Pastebin.com

There also seems to be an extra Layer<> involved.
What does the style look like now?
Where did this style come from?

I don’t see the extra Layer line that you mention (reiterating that I’m not a developer, so it’s quite likely that I’m not looking in the right place).

The style, after “I removed the first AudioFlicker line from both sections (blade and accent LED)”, looks like the link that I provided above ^.
Unless I’m misunderstanding your question; could you rephrase?

The original style came from TheDarkJedi - https://www.youtube.com/watch?v=Exe0sJ3oi4I

The config was posted here - Nates_OWK-EP4BladestylesV2 - Pastebin.com

From that original config, I changed some RGB values to other shades of the colors that I wanted, and exchanged some of the “standard color list” colors with other “standard color list” colors, added spark tip to the ignition and retraction, and added the powersave line (in 25% increments, as provided from Fett’s Style Editor).

In the original begins like this:

StylePtr<Layers<
  AudioFlicker<RotateColorsX<Variation,Rgb<8,75,235>>,RotateColorsX<Variation,Rgb<6,50,155>>>,

However, in yours, this is repeated twice for some reason:

StylePtr<Layers<
AudioFlicker<RotateColorsX<Variation,Rgb<48,48,225>>,RotateColorsX<Variation,Rgb<3,15,255>>>,
Layers<
AudioFlicker<RotateColorsX<Variation,Rgb<48,48,225>>,RotateColorsX<Variation,Rgb<3,15,255>>>,

I’m suspsecting that you somehow pasted it twice?
The 'Layers<" on line three is the extra one that I was mentioning before.

I think may still be looking at the “LiamsOldBenTest” file - LiamsOldBenTest - Pastebin.com

But this is the one that I linked in yesterday’s message - LiamsOB1_TestB - Pastebin.com
, which does not have that second instance of Layers (with the “AudioFlicker<RotateColorsX<Variation,Rgb<48,48,225>”…etc)
I deleted that based on the “style seems to have to non-transparent layers on top of each other” comment. Should that not have been done?

Apologies if I’m misunderstanding. Feel free to treat me like I’m five. :wink:

It should be done.
But when you removed the layer, was there a < at the end you removed as well?
(The < and the > has to match up, like parenthesis.)

Are you not able to access the second link that I posted above?

(I personally can’t log into Pastebin all of a sudden, not even through incognito or after deleting cache. I’m stuck in an endless cloudflare verification of my humanity, which was working perfectly fine a few minutes ago…)

Anyway, since I can’t point to it on Pastebin, here’s the same code from the link above. Does this answer your question?

 { "8-OldBen;common", "tracks/LeiasMessageLong.wav",
//******************************************
//ObiWanKenobi-EP4BlueAudioFlickerBladeStyle
//DarkerBlueTest2<48,48,225>/<3,15,255>withSparkTip&GreenClashConfigs
StylePtr<Layers<
  AudioFlicker<RotateColorsX<Variation,Rgb<48,48,225>>,RotateColorsX<Variation,Rgb<3,15,255>>>,
  LockupTrL<Layers<
    AlphaL<Blinking<Green,Strobe<Chartreuse,SpringGreen,30,30>,60,500>,Bump<Scale<BladeAngle<5000,28000>,Scale<BladeAngle<8000,16000>,Int<3000>,Int<44000>>,Int<3000>>,Scale<SlowNoise<Int<3000>>,Int<8000>,Int<18000>>>>,
    AlphaL<Blinking<BrownNoiseFlicker<Green,GreenYellow,50>,BrownNoiseFlicker<GreenYellow,SpringGreen,50>,100,500>,Bump<Scale<BladeAngle<5000,28000>,Scale<BladeAngle<8000,16000>,Int<3000>,Int<44000>>,Int<3000>>,Int<18000>>>>,TrConcat<TrInstant,AlphaL<Blinking<Green,Strobe<BrownNoiseFlicker<GreenYellow,LemonChiffon,500>,Green,15,30>,60,500>,Bump<Scale<BladeAngle<5000,28000>,Scale<BladeAngle<8000,16000>,Int<3000>,Int<44000>>,Int<3000>>,Scale<SlowNoise<Int<3000>>,Int<25000>,Int<32000>>>>,TrFade<300>>,TrSmoothFade<300>,SaberBase::LOCKUP_NORMAL>,
  TransitionEffectL<TrConcat<TrInstant,AlphaL<Strobe<Chartreuse,Yellow,20,30>,Bump<Scale<BladeAngle<5000,28000>,Scale<BladeAngle<8000,16000>,Int<3000>,Int<44000>>,Int<3000>>,Int<15000>>>,TrFade<300>>,EFFECT_LOCKUP_BEGIN>,
  TransitionEffectL<TrConcat<TrInstant,HumpFlickerL<Strobe<AlphaL<Orange,Int<20000>>,DarkOrange,20,30>,30>,TrSmoothFade<250>>,EFFECT_LOCKUP_BEGIN>,
  TransitionEffectL<TrConcat<TrInstant,Orange,TrDelay<25>>,EFFECT_LOCKUP_BEGIN>,
  TransitionEffectL<TrConcat<TrInstant,Strobe<DarkOrange,Yellow,20,30>,TrFade<200>,BrownNoiseFlickerL<AlphaL<Yellow,Int<16000>>,Int<50>>,TrJoinR<TrWipe<200>,TrWipeIn<200>,TrFade<200>>>,EFFECT_LOCKUP_END>,
  ResponsiveLightningBlockL<Strobe<Rgb<95,0,185>,AudioFlicker<White,Azure>,50,1>,TrConcat<TrInstant,AlphaL<White,Bump<Int<12000>,Int<18000>>>,TrFade<200>>,TrConcat<TrInstant,HumpFlickerL<AlphaL<White,Int<16000>>,30>,TrSmoothFade<600>>>,
  AlphaL<DodgerBlue,Bump<Int<0>,Int<7000>>>,
  TransitionEffectL<TrConcat<TrInstant,Rgb<0,0,200>,TrDelay<25>,AlphaL<Rgb<10,0,0>,Int<0>>,TrWipeIn<300>,AlphaL<Stripes<5000,1000,Red,Rgb<180,0,0>,Rgb<128,0,0>,Rgb<84,0,0>,Rgb<42,0,0>,Rgb<16,0,0>>,SmoothStep<Int<28000>,Int<4500>>>,TrJoin<TrSmoothFade<900>,TrWipe<700>>>,EFFECT_STAB>,
  TransitionEffectL<TrConcat<TrInstant,Moccasin,TrDelay<25>,AlphaL<TransitionEffect<TransitionEffect<Strobe<DarkOrange,Moccasin,20,20>,BrownNoiseFlicker<DarkOrange,Yellow,300>,TrInstant,TrFade<300>,EFFECT_BLAST>,DarkOrange,TrInstant,TrDelay<150>,EFFECT_BLAST>,Bump<Scale<BladeAngle<>,Int<25000>,Int<8000>>,Int<18000>>>,TrFade<600>>,EFFECT_BLAST>,
  TransitionEffectL<TrConcat<TrInstant,Rgb<64,12,225>,TrDelay<25>,AlphaL<TransitionEffect<TransitionEffect<Strobe<Chartreuse,SpringGreen,20,20>,BrownNoiseFlicker<SpringGreen,GreenYellow,300>,TrInstant,TrFade<300>,EFFECT_CLASH>,GreenYellow,TrInstant,TrDelay<150>,EFFECT_CLASH>,Bump<Scale<BladeAngle<>,Int<25000>,Int<8000>>,Int<24000>>>,TrFade<600>>,EFFECT_CLASH>,
  TransitionEffectL<TrConcat<TrInstant,AudioFlickerL<White>,TrFade<800>>,EFFECT_IGNITION>,
  LockupTrL<AlphaL<BrownNoiseFlickerL<White,Int<300>>,SmoothStep<Int<30000>,Int<5000>>>,TrWipeIn<400>,TrFade<300>,SaberBase::LOCKUP_DRAG>,
  LockupTrL<AlphaL<Mix<TwistAngle<>,Red,Orange>,SmoothStep<Int<28000>,Int<5000>>>,TrWipeIn<600>,TrFade<300>,SaberBase::LOCKUP_MELT>,
  InOutTrL<TrWipeSparkTip<Cyan,350>,TrWipeInSparkTip<Cyan,900>>>,
  EffectSequence<EFFECT_POWERSAVE,AlphaL<Black,Int<8192>>,AlphaL<Black,Int<16384>>,AlphaL<Black,Int<24576>>,AlphaL<Black,Int<0>>>>>(),