Open Swingbiter opened 1 year ago
Yes, I have this on my todo list for the near future. I need this updated for Godot 4 for my own projects too.
Hi, Is there any alternative for Big Number until this issue is fixed? Thanks
Edit: Nevermind, made it work by changing / adding few stuff. Thank you.
Forked off some Godot 4 changes. The API changes themselves aren't difficult. Reference to RefCounted. Some @warning_ignore() parser flags. I have not verified everything is working as intended.
The problem is Godot 4 constants are now deep, so you can't use const as a pseudo static variable. The 4.0.x documentation is not correct, as it still refers to Arrays and Dictionaries as being 'flat'.
https://github.com/godotengine/godot/issues/71413 https://github.com/godotengine/godot/pull/71051
My current plan is to port to Godot 4.1 instead, as we have static variables in that.
I adapted this for Godot 4, and work really well, I will try to fork and PR if I have time.
I have submitted a working 4.1 version now. The file is named Big.gd4 for now. This will replace the regular version once 4.1 is released.
Thanks for your work.
It gives this error: res://Big.gd:276 - Parse Error: Cannot call non-static function "_typeCheck()" from static function "minValue()". res://Big.gd:284 - Parse Error: Cannot call non-static function "_typeCheck()" from static function "maxValue()". res://Big.gd:276 - Parse Error: Cannot call non-static function "_typeCheck()" from static function "minValue()". res://Big.gd:284 - Parse Error: Cannot call non-static function "_typeCheck()" from static function "maxValue()".
Are you using the GD3 version in GD4 perhaps? Get the file named Big.gd4 instead, and rename it to Big.gd of course.
it is that gd4 one the gd3 one showed lot´s of other errors.
I now duplicated the typecheck function to have one static and one non-static, now all errors are gone. And i can work with it now.
Big.gd extends Reference which is no longer in Godot 4.0
TYPE_REAL
is nowTYPE_FLOAT
stepify()
is no longer a function. The linter recommendssnapped()
.const other
is trying to be written to in various functions.