OpenClonk Bugtracker - OpenClonk
View Issue Details
0002059OpenClonkEnginepublic2019-04-05 08:082019-04-05 13:33
ReporterMarky 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityhave not tried
StatusnewResolutionopen 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0002059: Loading multiple script files from a definition
DescriptionSometimes a script file can turn really large, and for a theme-based sorting of the functions I want to split the file into multiple files, as it is possible in System.ocg.

Obviously, there should be no need for #include or #appendto in that script, and duplicate functions should be noted (the latter is already there, via a warning).
Additional InformationSometimes it may make sense to extract the separate part to a library and include that, but sometimes it does not.
TagsNo tags attached.
Attached Files

Notes
(0006220)
Marky   
2019-04-05 13:33   
I tried to resolve this, in a similar way like the game script does with C4ExtraScriptHost - no success. It tries to load multiple files, but only the last loaded file prevails (this is sort of what I expected).
The problem for me is when the script is parsed it does not know about the other files, and I cannot see where the C4ExtraScriptHost gets parsed. An instance of the class is created, but that's it as far as I understand.

Issue History
2019-04-05 08:08MarkyNew Issue
2019-04-05 13:33MarkyNote Added: 0006220