Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
3

What is an IntValue/IntegerValue? [closed]

Asked by 10 years ago
Edited by JesseSong 3 years ago

I heard about this thing called a "IntValue" and, could someone tell me what it does?

Re-edited by JesseSong

Locked by JesseSong

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?

2 answers

Log in to vote
0
Answered by 10 years ago

IntValue short for Integer Value is used for numbers only.

local IntValue = 1234567890
1
Thanks Babicaik 20 — 10y
0
No problem! IntellectualBeing 430 — 10y
Ad
Log in to vote
0
Answered by
JesseSong 3916 Moderation Voter Community Moderator
3 years ago
Edited 3 years ago

(I know this question is over a year old at this point, but I'd like to add a better description to the previous answer so that the newer developers can have a greater understanding of IntValues!)

What are IntValues?

An IntValue or an IntergerValue is a data-type that confines a 64-bit integer. IntValues/IntegerValues can incarcerate any type of number except decimals and strings.

EX:

A sample would be this: 9858943 (of course this can be any number. This number is for demonstrational purposes).

But not this:

98848.342 [Because Intvalues cannot hold decimals, a NumberValue would be suitable for this case.]

Why are IntValues useful?

Intvalues are useful for properties/objects that can input numbers alongside a datatype.

A strong example would be items that are notional like Leaderstats, voting system, plotting- system and more.

[If I am missing something please comment.]

[//----------------------------------------------------------------------------------------------------//]

What are NumberValues?

(This is off-topic to your question, but you can use a NumberValue if you want to dispatch decimal datatype).

NumberValues are essentially IntValues. The only difference is that NumberValues can only hold decimals, whereas IntValues CANNOT!

This is just a brief explanation of NumberValues. You can use the developer hub for a greater understanding of NumberValues/IntValues.

Thanks, JesseSong!

References:

IntValues, NumberValues

Refined a minor grammatical error. Date: February 19, 2021