![]() |
Longer numerals / Class Implementation
I've been working for gScript for quite a while now, and one thing that bugs me is that the numerals supported in gScript can only go to 2147483647. In C++, another language I excel at, there are extended primitive types such as 'long' and 'long double' which allow you to go to a much higher number (long double goes from 3.4e-4932 to 1.1e+4932 -- scientific notation of course).
Another thing I'd like to see implemented is the functionality to create inline classes (ones inside the weapon script, for example) to organize the things the weapon / NPC-script does. These should include inheritance. Any comments? |
i dont see why you need long integers, but inline classes can improve performance i suppose
|
Maybe just me, I can't think of any reason you'd need to go up to 2147483647 that there is no workaround for.
|
For "classes" use a TStaticVar and join a class to it or define its functions manually with function objects.
|
The numbers I agree on.. well, I would love to see that implented :(
The Exp curve I made, just goes to 2147483647 as maxexp when almost near max level :( And I don't want to make a new formula, then I need to balance everything out again.. :( |
Quote:
e.g. PHP Code:
|
Yes and like I said, use a TStaticVar object and define its functions with function objects or a class.
PHP Code:
|
Quote:
Also, you're not getting my point. read the following words: INHERITANCE Your argument contained no hint of inheritance at all ;) ----- I'd also like to point out that I said classes within Weapon scripts, not class scripts. Creating a class in a Weapon script is much different than in a class script. |
OH GOD HELP I'M IN A BOX.
PHP Code:
PHP Code:
PHP Code:
As for longer numbers, you can use strings to display them, or I'm sure there are ways (not easy ways, mind you) for arbitrary precision math. I won't go into detail. |
Quote:
PHP Code:
So how would you implement inheritance in Graal? Quote:
Quote:
Edit: By the way PFA (?), if Graal didn't have a garbage collector you would cause memory leak with that ;) |
Quote:
|
| All times are GMT +2. The time now is 03:21 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.