AGS does not let declare a struct member function with name similar to global function. It shows "already defined" error.
Code example:
struct GameBoard
{
import static function SetViewport(int x1, int y1, int x2, y2);
}
It's a known issue. You can only get around it by a) using a different name for the function/property, or b) define the struct function/property before the global function/property. Since SetViewport is defined internally, you can't use option b here.
Even the internally defined methods have to adhere to this limitation. Take for example the Character.Room property versus the Room struct. The only reason the Room struct is allowed is because the Character.Room property is defined first. If they were defined the other way around, the internal scripts wouldn't compile either.