Forum Discussion
cybertech
10 years agoCommunity Member
GetPlayer GetVar in javascript
Hi,
I'm testing some of the javascript features. Using a trigger and calling functions in external javascript file (e.g. "user.js") is working correctly. From within the function I can get the pla...
ChrisWalsh
6 years agoCommunity Member
Hi Ariff,
Can you provide more info about what you see on the breakpoint. Specifically:
- On the line after
var player = GetPlayer();, what is the value of theplayervariable? Is it null? or is it an object? - If
playeris not null, does it contain a function calledGetPlayer()? You can test this by typing the following in the console window:player.GetVar(note that no brackets are present). - If the
player.GetVarfunction exists, what is the result of the call toplayer.GetVar("var_name_goes_here")? (don't forget to changevar_name_goes_herewith your variable name and also be aware that the string value is CaSe SenSiTiVe!!!
Drop feedback and I might be able to help more. Good luck.