Having some problems with variable names

I was wondering if there’s a way to still type in the syntax without it causing underline errors and representing what i want it to be which is a variable and not a piece of code.

an example is the word “Fortune” a short way to add it as an abbreviation would be to call it ‘for’. I could capitalize it but I just prefer lowercase in this situation.

Since for is code for a for loop i’m unable to name the variable the specific thing I wanted it to be called, so it’s got me thinking of capitalizing them all, but since I based even the names of all the ui buttons after lowercase names it would look inconsistent and i’d have to rename everything to fit it which involves wasting unnecessary time to do so.

e.g

local table = {
for = 1; -- in bold as it's a piece of code representing a loop
str = 5;
vig = 8;
}

While I’m already going to do this, it would be nice to know if there was an alternative so I can get the desired variable name I’m going for.

Do this

local table = {
   ["for"] = 1;
   ["str"] = 5;
   ["vig"] = 8;
}
2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.