Entity is loading wrong script not removed etc


#1

I have a strange problem. earlyer today i updated my local script. it’s saved on my disk. and i load it from the disk inside the entity. That worked fine.

But now i want to fix something. It’s loading some strange old script that’s not linked to that filename. Already cleared the viewer cache. But nothing changed.

Changed a few times ?d= extension behind the file name. it refuse to execute the new script. In the log i see the following when i click the entity. script:print()<< Click problem is that the script not have a print command that prin click. That’s from old script.

What’s going on ? why is high fidelity not loading the correct script ?

Just renamed the filename, pdated the filename in the entity. it still keeps loading the old script. Or using it from cache. Restarted sandbox. no luck.

ADD: did restart the whole server, also because updates. No luck. reloaded cache. The script did not respond at all ! Until i did a relog of the viewer. But still the wrong script is executed.

There’s anyway some reload cache bug. That not load all assets until you relog.

ADD: If i remove the script from the script url. It still keeps the entity script running. I can reload the cache. But the script keeps running in the entity

How do you force a reset to default on entity ? withjout delete it.

Now i did open the entity for seconbd time the script url came back. removed it again ity stopped. Now i do not get it started. How do high fidelity think we canm do things if it’s broken :open_mouth:

Looks like edit.js or high fidelity not stop scripts. not load right ones always and refuse to start scripts. The last one is problem that i see more.


#2

Ok. i did put a url from other door in the bad behaving entity. at least that script is running.
Putting old localdisk urlback in the door, and it start the wrong script again.

Why is high fidelity loading local scripts wrong ?
Copied the door with the correct script path inside. FAIL !

I cannot script if problems like this appear, I do not see other way to test scripts and debug it. you need to run it from local disk. Script editor, yes i just ooked is still useless. besides the script from the entity where not in the list to select.

Is high fidelity using some evil memory cache on top of the evil disk cache ?

Intressting:
I just removed this line at the end of my script.

return new ControllerInteractable();

and now it’s running the correct script.
But it halt with script errors, not strange when you try to get it working.
In other words i cannot script for hand controllers, because then it execute some other older script.

So why is return new ControllerInteractable(); execute the wrong previous script i used.

The script is now working, after i did add the jsopn data i forgot. But i tries it again. pasting return new ControllerInteractable(); at the end in the script and some other script get executed.

I did add

    ControllerInteractable = function()
    {
        // Initiate object
        print("ControllerInteractable");
    };

At the begin of the script, that at least solves the use of the wrong script. I did not add that part because it not seems use full in my application.

Why is the script loading old script that is not in the script url bar when you forget the ControllerInteractable = function() in the script ? But did add return new ControllerInteractable(); at the end ?


#3

On top of all problems, there’s good news !

I got me door working with the HTC vive controller ! :smiley:

And i found out also why the door sometimes start to go wrong, think it need to be moved to AC script… The problem is that the script is stopping as soon the user leaves or logout. and then the start rotation is wrong. because it never could close correct.

At least it works, but i still think there’s a small bug with return new ControllerInteractable();