Table member declaration

Find quick help here to get you started with Hollywood
Post Reply
NathanH
Posts: 107
Joined: Sun Jul 05, 2015 1:29 am
Location: Caldwell, Idaho

Table member declaration

Post by NathanH »

Hi,

The following code gives a 'variable expected' error.

Code: Select all

s={}
s.to=""
but simply changing the member name from 'to' to 'too' solves the problem. What am I missing?

Code: Select all

s={}
s.too=""
NathanH
plouf
Posts: 473
Joined: Sun Feb 04, 2018 11:51 pm
Location: Athens,Greece

Re: Table member declaration

Post by plouf »

Christos
NathanH
Posts: 107
Joined: Sun Jul 05, 2015 1:29 am
Location: Caldwell, Idaho

Re: Table member declaration

Post by NathanH »

Thanks, I was wondering about that because it is a table member not a variable. For example, using the the s["to"] syntax works for addressing it as a table member. Easy fix though, I'll just use s.src and s.dest rather than s.from and s.to. Thanks for the info!

NathanH
Post Reply