Hundreds of features to explore
Games made in Construct
Your questions answered
Trusted by schools and universities worldwide
Free education resources to use in the classroom
Students do not need accounts with us
What we believe
We are in this together
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
Hi.
I can easily call some javascript on the page the game sits in, if I only call the function with integers. I´ve tried different ways of formatting the call, but none seems to help, and no error is thrown.
This works:
"parent.test(" & totalScore & ");"[/code:48855qcr] This doesent: [code:48855qcr]"parent.test(currentPlayer, " & totalScore & ");" "parent.test(" & currentPlayer & ", " & totalScore & ");"[/code:48855qcr] currentPlayer is a string, and totalScore is an int. What am I doing wrong? Thanks alot
Try this:
"parent.test('" & currentPlayer & "', " & totalScore & ");"
So the resulting string will look like this:
parent.test('John', 1500);
Develop games in your browser. Powerful, performant & highly capable.
Ah, single plings!
It works, thanks alot