OceanTrading
New member
This should be easy, but it's been years since I've "thinkscript-ed" and I currently "lost in the weeds".
I have this that works:
#
declare lower;
plot halfpipe = .5;
halfpipe.AssignValueColor(Color.RED);
halfpipe.SetLineWeight(1);
I've made the input "halfpipe" an input variable and assigned it with an initial default value
#
declare lower;
input halfpipe = .5; # Assign initial default value
#Here, where I want to plot it, thinkscript complains by highlighting in the background of the "halfpipe" variable in all three spots:
plot halfpipe;
halfpipe.AssignValueColor(Color.RED);
halfpipe.SetLineWeight(1);
With these complaints that I don't understand:
Identifier Already Used: halfpipe at 35:6
Can not call AssignValueColor on halfpipe at 36:1
Can not call SetLineWeight on halfpipe at 37:1
Value never assigned to halfpipe at 35:6
... wtf, I did assign and initial value
I've tried it without assigning and initial value, I've tried placing both () & [] around "halfpipe" but no joy.
What am I missing... I know I'll feel real dumb after someone points out my "obvious" mistake..
Cheers
I have this that works:
#
declare lower;
plot halfpipe = .5;
halfpipe.AssignValueColor(Color.RED);
halfpipe.SetLineWeight(1);
I've made the input "halfpipe" an input variable and assigned it with an initial default value
#
declare lower;
input halfpipe = .5; # Assign initial default value
#Here, where I want to plot it, thinkscript complains by highlighting in the background of the "halfpipe" variable in all three spots:
plot halfpipe;
halfpipe.AssignValueColor(Color.RED);
halfpipe.SetLineWeight(1);
With these complaints that I don't understand:
Identifier Already Used: halfpipe at 35:6
Can not call AssignValueColor on halfpipe at 36:1
Can not call SetLineWeight on halfpipe at 37:1
Value never assigned to halfpipe at 35:6
... wtf, I did assign and initial value
I've tried it without assigning and initial value, I've tried placing both () & [] around "halfpipe" but no joy.
What am I missing... I know I'll feel real dumb after someone points out my "obvious" mistake..
Cheers