I have attempted to add a new expression function to the Array "plugin", but having a hard time making Construct understand that the expression is taking one parameter.
I've added the following code to runtime.js:
Exps.prototype.rank = function (ret, playerNumber)
var ranking = 1;
And added the following to edittime.js:
AddExpression(13, ef_return_number, "Get rank for player", "Array", "rank", "Get rank for a player");
The expression shows up in Construct as expected (i.e. I can enter SomeArray. and the "rank" expression will show up in the dropdown menu). Though, if i enter SomeArray.rank(1), it says 'rank' does not take 1 parameter (should have 0).
What am I doing wrong? How do I properly make the expression take a parameter?