Position of the local idxXYZ lines

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
User avatar
McMelloW
Posts: 434
Joined: Monday 20 November 2017 17:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V2024.1
Location: Harderwijk, NL
Contact:

Position of the local idxXYZ lines

Post by McMelloW »

DannyBloe

Does the lines 'local idxXYZ = 123' have to be at the start of script or can they put also anywhere else in the dzVents scripts?
Greetings McMelloW
BakSeeDaa
Posts: 485
Joined: Thursday 17 September 2015 10:13
Target OS: Raspberry Pi / ODroid
Domoticz version:

Re: Position of the local idxXYZ lines

Post by BakSeeDaa »

McMelloW wrote: Sunday 24 December 2017 19:09 DannyBloe

Does the lines 'local idxXYZ = 123' have to be at the start of script or can they put also anywhere else in the dzVents scripts?
Unlike global variables, local variables have their scope limited to the block where they are declared. So in short, the place in the script where you declare a local variable is important and will certainly affect the way how a scripts works. The question was recently answered here. As for the previous post, nor this question is about dzVents but LUA.

;)
User avatar
McMelloW
Posts: 434
Joined: Monday 20 November 2017 17:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V2024.1
Location: Harderwijk, NL
Contact:

Re: Position of the local idxXYZ lines

Post by McMelloW »

Thanks for the reply. I will study this link
Greetings McMelloW
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest