Conky: Global variables gets shared between two lua scripts

Created on 18 Nov 2019  路  2Comments  路  Source: brndnmtthws/conky

Issue

I run two lua scripts from conky. Each has a global variable called debug. Each does something if debug is not zero. If I set debug to 1 in one of the scripts, then the _other_ script acts as if _its_ version of the variable had been changed. Is this a known limitation?

Information

conky 1.11.4_pre. (I would use a more recent version, were I not to encounter bug #821.)

question

Most helpful comment

Internet tells me it is a typical lua behavior because of global variables. Look this up and modify your scripts to add local to everything so you don't accidentally assign wrong overwrite anything.

All 2 comments

Internet tells me it is a typical lua behavior because of global variables. Look this up and modify your scripts to add local to everything so you don't accidentally assign wrong overwrite anything.

Understood.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zero77 picture zero77  路  3Comments

akorop picture akorop  路  3Comments

bad-interpreter picture bad-interpreter  路  4Comments

Microcrap picture Microcrap  路  4Comments

Airblader picture Airblader  路  4Comments