Unsure of how to create a line in this script

Hi, I am trying to create a diagrid structure , however, I cant get a line connecting each end of the diagrid. How do I fix this?diagrid script.gh (8.7 KB)

I used this link to create the script?

page 24 of the document: They connect list item with index 0 & 2 for the diagonal. You can 1&3 for the second diagonal. Is this what you want?