doneyes
|
  |
| Joined: 21 Mar 2008 |
| Total Posts: 3466 |
|
|
| 10 Jan 2013 05:05 PM |
.02 and 4
4 is the integer. How can I find that out using a script? Also, I am not looking at rounding to an integer. |
|
|
| Report Abuse |
|
|
| |
|
doneyes
|
  |
| Joined: 21 Mar 2008 |
| Total Posts: 3466 |
|
|
| 10 Jan 2013 05:11 PM |
would this check if 4 is an integer?
if 4%1 == 0 then print("4 is an integer!") end
would this work? |
|
|
| Report Abuse |
|
|
doneyes
|
  |
| Joined: 21 Mar 2008 |
| Total Posts: 3466 |
|
|
| 10 Jan 2013 05:15 PM |
| Nevermind, I think I got it. |
|
|
| Report Abuse |
|
|
|
| 10 Jan 2013 05:59 PM |
Wow um you guys are dumbies... atleast I got a laugh out of this.
print(type(4))
That'll print what the number is.
if type(4) == "integer" then print("Is an integer") end
That'll print "Is an integer" if the number is an integer. Leave scripting alone if you're not going to be serious... |
|
|
| Report Abuse |
|
|
|
| 10 Jan 2013 06:05 PM |
@Terminal, are you kidding me? that would only return if it's a number or not. |
|
|
| Report Abuse |
|
|
doneyes
|
  |
| Joined: 21 Mar 2008 |
| Total Posts: 3466 |
|
|
| 10 Jan 2013 06:25 PM |
| Yeah terminal what I typed up worked perfectly fine. If the number had a decimal, it wouldn't print, if it was whole, than it would print. It doesn't matter what was printing, it was the fact that something printed. And I don't want it to check to see if the number is equal to a string. |
|
|
| Report Abuse |
|
|
|
| 10 Jan 2013 06:39 PM |
'Wow um you guys are dumbies...'
You are the only 'dumby' I see here. |
|
|
| Report Abuse |
|
|
|
| 10 Jan 2013 06:42 PM |
"Leave scripting alone if you're not going to be serious..." Maybe you should take your own advice |
|
|
| Report Abuse |
|
|
|
| 11 Jan 2013 05:22 PM |
| I don't see you posting any clever scripts Cody. I'm no pro at C++, but for me, Roblox Lua is as easy as reading. |
|
|
| Report Abuse |
|
|
|
| 11 Jan 2013 05:25 PM |
Integer..
Any whole number not including zero.
I thought Lua allowed the use of Negatives..huh..who knew? You might be able to create some type of function, so that when you plugin the number it returns the requested information.
|Paradoxical| I shun thy heathen, dost thou not know that flames will devour thy mind? |
|
|
| Report Abuse |
|
|