I've been trying for a while now to get the fgl api working in a plugin to use it in games. The new version adds a variable to check if Cross-Promotion is allowed by the host, which I am trying to implement as a condition.
Cnds.prototype.FGLEnabled = function()
As far as I can tell, this should work. However the event ends up firing whether or not the variable is true.
doing console.log(fgl); shows that the object does have the property 'crossPromotionEnabled' and it's true/false at the correct time. But fgl.crossPromotionEnabled just returns undefined.
I've compared the value in a c2 unrelated script and it works perfectly fine too. It seems to only be in the condition function that it wont work.
Is this an engine limitation, or am I that bad at programming?