File exporting not working.

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

I was trying to make portals between scenes without needing to make a separate Area2D for every scene. I am getting an error message:
:E 0:00:03.568 _load: Resource file not found: res://.
<C++ Error> Condition “!file_check->file_exists(p_path)” is true. Returned: RES()
<C++ Source> core/io/resource_loader.cpp:283 @ _load() @ _physics_process()

it’s weird because I realized the script works perfectly fine in the second scene.
On the other hand on the first scene, I get the variable isn’t created and I get the error message.

here’s the code:

extends Area2D

#var next_world
export(String, FILE,“*.tscn”) var next_world

func _physics_process(delta):
var bodies = get_overlapping_bodies()
for body in bodies:
if == “gamer”:

:bust_in_silhouette: Reply From: timothybrentwood

File path strings aRe CaSe SENSITIVE. Make sure your paTh/TO/FileS strings match exactly the directory and file before exporting.

Your game will play in the editor perfectly fine if the strings don’t match the case of the directory structure + file name exactly.

The problem was with the main scene not being set to what I thought it was. Yeah, really stupid mistake.

FilipKench | 2021-05-08 20:18