Can someone tell me how to create an alias to set a variable?
Eg. typing
setBuffer MrTank
would set the value of variable "buffer" to "MrTank".
This doesn't work:
world.addAlias(
"setBuffer",
"sb (.+)", "",
eEnabled | eAliasRegExp, "set" );
function set( id, output, wildcards ) {
wildcards = VBArray( wildcards ).toArray();
world.setVariable( "buffer", wildcards[ 0 ] );
world.note( "buffer: '" + wildcards[ 0 ] + "'" );
return;
}
- skj
Eg. typing
setBuffer MrTank
would set the value of variable "buffer" to "MrTank".
This doesn't work:
world.addAlias(
"setBuffer",
"sb (.+)", "",
eEnabled | eAliasRegExp, "set" );
function set( id, output, wildcards ) {
wildcards = VBArray( wildcards ).toArray();
world.setVariable( "buffer", wildcards[ 0 ] );
world.note( "buffer: '" + wildcards[ 0 ] + "'" );
return;
}
- skj