-
Notifications
You must be signed in to change notification settings - Fork 43
Fix for floating number not able to be parsed (Godot) #47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
If you are interested I could also add the Godot C# setup to the Readme |
|
|
|
Also, the video alone is not sufficient to determine the exact cause of the error. Please provide the error message, stack trace and C# and Lua source code. |
Error message :Code :using Godot;
using System;
using Lua;
public partial class LuaErrorShowcase : Node
{
public override async void _Ready()
{
// Create a LuaState
var state = LuaState.Create();
// Execute a Lua script string with DoStringAsync
var results = await state.DoStringAsync("return 1.0 + 1");
// 2
Console.WriteLine(results[0]);
}
} |
|
It seems to be a problem about decimal separator. |
|
@Akeit0 that's it my bad, I'm not used to use those function in c# |
|
Merged the PR. Thanks! |
Is it still possible to provide this? I'm not sure exactly what needs to be done for getting this to work in Godot but based on intuition, the src/Lua folder is probably the one I want. There are a lot of red errors when I do this (in almost every file), mostly just missing Edit: if I go through all the usings and also add |
|
@Xeraster I have stopped using it for now and switched back to c++ for my project, but if you want it's on the readme on my fork even if the rest is not up to date |
Hello, I started using Lua-CSharp in Godot for my game to implement modding and map making scripts.
While testing my script I realized that in Godot when using floating number the parser would make the script crash and while searching the error I come up with this little change, which fixes the crashes.
Small exemple of a script in my test scene :
https://github.com/user-attachments/assets/34f8c20b-d729-450d-b18f-685081274d3a
(Hope it can be useful ^^)