popupmenu help

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By rafah

Hi all someone yesterday was really cool and help me figure out that to make a popup work with a button it has to be right under the button on the scenes section of the GUI, but now Im having an issue where I’m trying to emit the signal from the players code, I have uploaded the player code and images of both scenes and the errors I’m getting, no matter where I put my popupmenu I cannot seem to find it, not sure exactly what I’m doing wrong, I hope my problem is clear enough.

Level 1 scenes scenesandinstances hosted at ImgBB — ImgBB

player scene playerscene hosted at ImgBB — ImgBB

player code playercode hosted at ImgBB — ImgBB

error1 error1 hosted at ImgBB — ImgBB

error 2 error2 hosted at ImgBB — ImgBB

:bust_in_silhouette: Reply From: salihkallai

Based on your Error, You can’t call method of a node without referencing it. Try getting the popup node using get_node method instood of $losepopup.popup()

Sample code

var pop = get_parent().get_node('path to node')
#now call
pop.popup()