Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   How do you detect decimal numbers? (https://forums.graalonline.com/forums/showthread.php?t=69875)

wild8900 11-05-2006 06:45 PM

How do you detect decimal numbers?
 
I just need to know how I can detect a decimal number (like 1.5).
I need to know in Gs1 sorry.

Novo 11-05-2006 06:49 PM

If you know it's a number...

PHP Code:

 if ( var % )
   ... 

I don't know GS1, so ... There might be a few errors... But the concept is there.

wild8900 11-05-2006 07:05 PM

Alright, thanks, you have no idea how much this helped.

Admins 11-08-2006 02:41 AM

or something like this?

PHP Code:

if (var!=int(var))
  ... 


KuJi 11-08-2006 03:11 AM

Seriously, why didn't you just use int()? O.o

ryu_no_bishie 11-08-2006 04:57 AM

maybe he uses vb? Int in vb is a solid non decimal number,

Twinny 11-08-2006 06:19 AM

Yeah but VB sucks...and has no relevance to gscript ^-^

ryu_no_bishie 11-08-2006 06:32 AM

vb isnt bad sintax in my opinion, its just the way it runs and its requirements and stuff really suck

wild8900 11-08-2006 09:21 AM

lol its no big deal, my problem is solved!


All times are GMT +2. The time now is 07:09 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.