Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Aaron | |
Old Version | Published before Godot 3 was released. |
I have a script like this:
var _thread
func start():
_thread = Thread.new()
_thread.start(self, "_thread_func")
func _thread_func():
pass
Fairly basic stuff.
But when my game runs and I reach the point where this code is run I get a background error. There’s no stack trace for it, but it only appears when the line _thread.start(self, "_thread_func")
is present. This is what I get when I hover over the error in the error box:
Type:Error
Description:
Time: <time>
C Error: Method/Function Failed.
C Source: core/bind/core_bind.cpp:1939
C Function: _start_func
Aren’t you missing ()
after func _thread_func
? Also, can you try renaming _thread_func
to something else.
Bojidar Marinov | 2016-04-16 12:32
The missing ()
was a typo. Just put those in.
Aaron | 2016-04-17 01:47