Questions about code, syntax and related topics.
How do you fix invalid operands ânilâ and âfloatâ in an operator â*â in godot
I want to know that how can I check that what is the value of text in my label.
For eg:
If there is a Label, Label2, a Button and a Button2 as children of Node 2d. The code of the Node 2d says whenever the Button is pressed, a random value from 1 to 3 will be put into the label. And when the Button2 is pressed, the text in the Label is checked and according to the value present in it (i.e. 1, 2 or 3), the text in Label2 is changed to A, B or C.
But I am not able to code for the Button2 being pressed, since I donât know how to check the text in the Label and compare it.
Please help soon.
Please create your own post in the Help section.
E 0:00:08:0870 killzone.gd:8 @ _on_body_entered(): Node not found: âCollisionshape2Dâ (relative to â/root/Game/playerâ).
<C++ Error> Method/function failed. Returning: nullptr
<C++ Source> scene/main/node.cpp:1638 @ get_node()
killzone.gd:8 @ _on_body_entered()
(hello i have thise error on my engine can ou help me)
Make sure the path to your node is correct, make sure all names including capital letters match. To reduce errors you can drag and drop the node into your script from the scene tree and godot will post the path for you.
If it doesnât work or needs more discussion then please open a new post in the Help section