Hey guys, I had a simple question
How can I bring my [Constant String] block called “Code” into my [Execute JS] block
BLOCK:ConstantString
LABEL:Code
value = "1543321"
=> VAR @Code
ENDBLOCK
(function(){
var searchString = ##Code##
...
Hey guys, I had a simple question
How can I bring my [Constant String] block called “Code” into my [Execute JS] block
BLOCK:ConstantString
LABEL:Code
value = "1543321"
=> VAR @Code
ENDBLOCK
(function(){
var searchString = ##Code##
...
but needs add how imput
var searchString = Code;
tried that even before but I get this error:
[SAFE MODE] Exception caught and saved to data.ERROR: PuppeteerSharp.EvaluationFailedException: Evaluation failed: ReferenceError: Code is not defined
at '':4:14
at '':132:3
I have “Code” block (constant string) at first:
BLOCK:ConstantString
LABEL:Code
value = "123123"
=> VAR @Code
ENDBLOCK
Bump, Can anybody tell the issue with this ? I appreciate it
Show the entire code, are you defining the variable ‘code’? Send the entire LOLCODE block where everything can be seen
Not very difficult
BLOCK:ConstantString
value = "12345678910"
=> VAR @Code
ENDBLOCK
BLOCK:PuppeteerOpenBrowser
ENDBLOCK
BLOCK:PuppeteerExecuteJs
expression = $"console.log(<Code>);"
=> VAR @puppeteerExecuteJsOutput
ENDBLOCK
Solved, ty
I didn’t use double quotes around variable, I thought it’s gonna consider the whole <Code> as string
Solution: "<Code>"