"ViewportX" in the above code is likely a global variable that you were supposed to create yourself.
On another hand, "SetViewport" is an old function that was replaced by Game.Camera.
Speaking of which, the manual now has a table of deprecated functions, which also mentions contemporary replacements:
https://adventuregamestudio.github.io/ags-manual/ObsoleteScriptAPI.html
On another hand, "SetViewport" is an old function that was replaced by Game.Camera.
Speaking of which, the manual now has a table of deprecated functions, which also mentions contemporary replacements:
https://adventuregamestudio.github.io/ags-manual/ObsoleteScriptAPI.html