Ways to Simplify or Improve code

Already has been said.

And I already know what it is, I dont need to know.

1 Like

Yes, but it is still in the main post? You could edit the post with the code example and explanation I gave, because most people will not scroll through 40 replies to gather information that should be on the OP.

I gave a Topic I made back in November that has both Graphemes ans sub, I only showed one of them as an example, not both, but sure. I’ll have to do it later.

(Cannot spell)

I should let ya know that this is actually pretty bad advice. Errors should be reserved only for irreversible states. Instead, you can return a boolean success state before or after the rest of your return tuple.

For example, let’s say that you have an inventory system that requires some sort of table. If it doesn’t exist, should you error? No, you replace the parameter with a placeholder value. Or, you can return an unsuccessful boolean state

You’re also wrong on this, since you’re actually making it too complex. Just do math.clamp(value, min, max)

Or alternatively:

local Hours = Seconds % ((60 ^ 2) * 24) -- If needed
local Minutes = Seconds % (60 ^ 2) -- 60 seconds per minute, 60 minutes per hour
local Seconds = Seconds % 60 -- 60 seconds per minutes

Or, you can change the text label’s property, MaxVisibleGraphemes, which simplifies it, and can be tweened.

1 Like

Basically.
Already.
Said.
By.
People.

I keep getting Replies over the same exact things that were said prior.

Sort of, Depends on the Context tho you said one of them so.

Well, shouldn’t you fix the post then?

No.

1 Like

I rather have people see the Original to them than just replace it, so People can actually see what’s wrong with it, and fix it, according to replies, also, it would make the replies seem out of context.

Ok.

You’ll keep getting these replies then, so don’t complain to me about it.

You should read what I posted in a programming guidelines post I made a while back:

2 Likes

Ok.

Ok!