Unusable Verse modules

Please select what you are reporting on:

Verse

What Type of Bug are you experiencing?

Verse

Summary

Seems like the previous report didn’t work, so i try it again:

Parametric classes not usable outside of own file

Steps to Reproduce

Make a parametric class, reference it outside the file.
If you rename the file with the parametric class, the code will break.
If you rename the file with that references the parametric class, it will work again.
If you rename the file with the parametric class, the code will break again.
If you rename the file with that references the parametric class, it will work again.
Seems like the order in which the files were created/renamed causes this issue.

Edt.: It becomes even worse. Even if UEFN might succeed with compiling verse, the actual preview server might fail.

VerseBuild: Error: C:/build/FortniteGame/Plugins/GameFeatures/c7fab05b-42f5-3207-b282-c58a1a7342da/Content/Daigoro.verse(475,18, 475,42) : Script error 3502: Can’t access a function from a preceding type.
VerseBuild: Error: C:/build/FortniteGame/Plugins/GameFeatures/c7fab05b-42f5-3207-b282-c58a1a7342da/Content/Daigoro.verse(475,18, 475,42): Script error 3502: Can’t access a function from a preceding type.
LogSolarisIde: Error: C:/build/FortniteGame/Plugins/GameFeatures/c7fab05b-42f5-3207-b282-c58a1a7342da/Content/Daigoro.verse(475,18, 475,42): Script Error 3.502: Can’t access a function from a preceding type.
JOB_ID=a96f69d2-5227-46a6-b67e-16104dfbf6ff)., CookJobId:a96f69d2-5227-46a6-b67e-16104dfbf6ff
We encountered an error preparing your project. Error: errors.com.epicgames.content-service.cook-failure, An error occurred while communicating with the game servers (Content (re)cook error errors.com.epicgames.cookplugin.versebuildscripterror.
Too many warnings / errors, aborted processing of errors / warnings

Expected Result

No errors, the class should be called outside the file (it’s not in a module, and even when inside a module, the same error occurs)

Observed Result

Can’t access a function from a preceding type. (3502)
Error only raises once we make a reference to that class.

Platform(s)

All

The status of UCB-1061 incident has been moved from ‘Awaiting Validation’ to ‘Closed’.

1 Like

Updated the report to mention, that even if compiling in UEFN works, the actual preview server might fail. Added some logs.

This is still an issue in the current version of UEFN. The only workaround I’ve found is to write my own packager that combines all .verse files into a single .verse file for UEFN to compile.

I gave up on reporting this one. It was reported thrice already and closed all three times. Seems like there is an internal ticket for this already, so all ours get closed. Not sure if it will actually be fixed at some point or if it’s just “noticed”, but there is nothing to do about it other than hoping it works at some point.

I also switched to writing private programs to work with Verse due to all those issues and I think we aren’t the only ones.

1 Like

What do you mean by writing private programs?

Personal tools

I’m encountering Can’t access a function from a preceding type.(3502) when I create a new verse file (called queue) and implement the list version of queues according to the EPIC documentation. The queue.verse code won’t compile due to this error.

Is this the same issue as posted on this thread or different? And, is there a workaround?

It is the exact same issue. The only “workaround” is to not use generic classes across files - until Epic allows us to create own plugins or external modules.

Wait, why was this ticket just closed?..

More info. From: Ask Epic : Verse

Due to the way the compiler is currently implemented, processing of types is very dependent on the order the types occur, most obvious with parametric types. This can be resolved in the same file by reordering definitions, but ordering between files is not specified. MaxVerse will alleviate this issue via pervasive leniency.