As well as not using quotes, you should not be using getnpc(). For the new scripting engine, we use findnpc():
PHP Code:
with (findNPC("NameOfNPC"))
{
// foo
}
Also inside with () blocks, when you want to retrieve this. flags from outside of the with () block, you must use thiso.:
PHP Code:
with (findNPC("Control-Weather"))
{
this.rights.lastcheckedmoisture = thiso.hour;
// etc
}