For the “Create your own NPC Medic” tutorial on the documention, in the queue.verse code that the documentation provides, there is a script error. Line 5 for “(t:type)”.
See error from UEFN: queue.verse(5,14, 5,22) : Script error 3502: Can’t access a function from a preceding type.
The code provided in the tutorial has to be in the same .verse file with the queue class code preceding the code found in medic_example.verse. Though not always ideal, it does work.
@SatoriFN This is a tricky problem with the current compiler. Parametric classes like the queue are not currently usable outside of their file, but putting the file that calls the generic class in a submodule resolves this. Check step 2.6 in the “Healing Characters inside a volume” of the medic tutorial, that’s the part that covers moving the medic_example into its own separate submodule. In a future version of Verse this step should be unnecessary - parametric classes like queue.verse will be useable in other files regardless of your file structure. You could also implement queue.verse in the file that calls it directly but as you said it’s not always ideal. Check if the file structure in the image I attached resolves the error.
THANK YOU! This corrected the issues for me too. I apologize, I really believed I followed the tutorial exactly as written. I am noob. I am learning how to program.