This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
0
Noob-Question: How do you change a variable in LUA, and how do you make a function trigger if a variable is of a certain value
Post Body
Okay, so say I have this code
a = 5
b = 6
and I wanted to create a function, that makes it so if a=6, then it sets b to = 7.
I assumed you'd do it like a = 5 b =6 set a 1 function (a = 6) if a = 6, then b 1
but uh, that doesn't exactly work. so what would you do?
*basically, the point is I want to make a program where if a variable changes it effects the entire program through functions, and triggers chain reactions and stuff
Author
Account Strength
100%
Account Age
7 years
Verified Email
Yes
Verified Flair
No
Total Karma
2,145
Link Karma
1,577
Comment Karma
568
Profile updated: 5 days ago
Posts updated: 7 months ago
Subreddit
Post Details
We try to extract some basic information from the post title. This is not
always successful or accurate, please use your best judgement and compare
these values to the post title and body for confirmation.
- Posted
- 6 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/lua/comment...