-
Double Brackets
Hello again :)
Quick question - what are the double brackets for?
PHP Code:
if(menu == game["menu_weapon_allies"] || menu == game["menu_weapon_axis"])
{
self closeMenu();
self closeInGameMenu();
self [[level.weapon]](response);
}
Thanks in advance.
Editted:
I just found this in the gametype script:
in main()
Code:
level.weapon = ::menuWeapon;
And the function:
Code:
menuWeapon(response)
I guess I answered my own question... is it some kind of alias for the function?
-
Yes, you are correct.
PHP Code:
foo()
{
bar = ::foobar;
[[bar]]();
}
foobar()
{
iprintln("hello");
}