I used to be able to do this:
var a=pc.createScript("Script1"); var b=pc.createScript("Script2");
I used to be able to put them in one file and use both scripts. This is no longer possible. And even uploading a script doesn’t make it possible to select. Is this a bug?
Hi @guzu,
What error are you getting when you try that?
I’ve tried uploading a .js file that contains multiple PC scripts, and it’s parsing without an issue. The p2-integration.js script:
@Leonidas well, try using them in a script component.
Seems to be working fine as well:
@Leonidas Thanks to your reply, I was able to figure it out. I was using a capital letter in one of the attributes. {Title:‘score’}
That capital letter was causing all the trouble
Now I can finish my code XD
Ah nice catch! Indeed all JS property/variable names are case sensitive.