karadayi
karadayi

Reputation: 2269

Lua Script - Attempt to index global (a nil value)

If I am running this Code than I am getting the error that says:

imapfilter/config.lua:9: attempt to index global 'account1' (a nil value)

The Code [Source] is below:

options.timeout = 120
options.subscribe = true

account1 = IMAP {
 server = 'mail.xxx.de',
 username = 'username',
 password = 'password',

 msgs = account1.INBOX:contain_subject('***SPAM***'),
 account1.INBOX:move_messages(account1['spam'],msgs)


}

The Commas are not correct?

Upvotes: 1

Views: 5508

Answers (1)

Mischa
Mischa

Reputation: 1333

You are calling account1 on it's own definition.
That's not possible 'cause account1 doesn't exist until you close it with }

Upvotes: 0

Related Questions