Some Dev Help Needed with Script issue


I’ve been experimenting with making a illuminating flaregun as warm up for a worklist ticket ill be working on. Unfortunately, I’ve hit a sort of a brick wall. Please ignore the rotation direction as I have yet to work the attachment points

Basically, I borrowed alot from the createPopgun script and the fireworks script. However my main issue comes from the fact that suddenly the entity script cannot find any of the Global Instances like Vec3, Script of Controller.

Here are the scripts:

Any devs have a clue why this just doesnt work right now?


CC: @Caitlyn for visibility as this sorta relates to the worklist ticket ill be working after this.

Edit: disregard @ctrlaltdavid to the rescue!


flaregun.ks #226 missing semicolon

Though I caught this by eyeball inspection, I recommend trying:


JS is a tad bit too forgiving with semi colons. No error messages for it, and it is not the cause of the issue.

[UncaughtException] ReferenceError: Can't find variable: Controller in (EntityID:{ca7256b0-6ac4-427b-a038-afb080e7052b}, file:///c:/Users/Menithal/Documents/High Fidelity/Custom Scripts/flaregun/flaregun.js):234
[05/06 10:26:19] [WARNING] [Backtrace]
[05/06 10:26:19] [WARNING]     <anonymous>() at (EntityID:{ca7256b0-6ac4-427b-a038-afb080e7052b}, file:///c:/Users/Menithal/Documents/High Fidelity/Custom Scripts/flaregun/flaregun.js):234
[05/06 10:26:19] [WARNING]     <global>() at (EntityID:{ca7256b0-6ac4-427b-a038-afb080e7052b}, file:///c:/Users/Menithal/Documents/High Fidelity/Custom Scripts/flaregun/flaregun.js):374

Similar issues occur with Vec3, Entities, Avatar Globals for that specific script.

Infact, many lints do not like the prototypal javascript.


Infact, even just this, causes it when added to an Entity via an Entity Rez script.

(function() {

on the console this works just fine, but immedietly when bundled with a just rezed object, it fails with the globals


Comparing with pingPongGun.js … could it be the extra “()” before the final semicolon at the end of flaregun.js?



Its a function thats given to the entities, not called by entities!

Yep, that fixed it! thanks. I can get to finally figuring the rest out. Thanks!