can you build it (or a similar example) in the UI?...
# suitescript
s
can you build it (or a similar example) in the UI? if so, try that and load it in the dev console, do some inspecting and see what's what.