Gateway script not working for system.tag.writeblocking

I don't know about the problem you are asking about but all your tag readBlocking() should be executed in the one statement and same with your writeBlocking().

If you post formatted code (rather than a picture of code) we can copy and edit in our answers. See Wiki - how to post code on this forum.