Classic-Burger Posted 11 hours ago Report Share Posted 11 hours ago Stan made some mistakes and I don't know what happened to my post, let's start over. I have many problems with schema component. convert.js Quote Link to comment Share on other sites More sharing options...
Grapjas Posted 9 hours ago Report Share Posted 9 hours ago (edited) What are the issues? What does the log say? Also you are defining cmpPlayer twice in CanConvert. At the bottom half of Helpers/Player.js there are some functions that might help clean up your code a bit. Edited 9 hours ago by Grapjas Quote Link to comment Share on other sites More sharing options...
Classic-Burger Posted 2 hours ago Author Report Share Posted 2 hours ago (edited) 7 hours ago, Grapjas said: At the bottom half of Helpers/Player.js there are some functions that might help clean up your code a bit. I'm not there yet. Clean my code from another file, how? The interesting log. ERROR: CXeromyces: Parse error: in_memory_buffer:1: Element choice is empty ERROR: CXeromyces: Parse error: in_memory_buffer:1: Element choice is empty ERROR: CXeromyces: Parse error: in_memory_buffer:1: Element choice is empty ERROR: CXeromyces: Parse error: in_memory_buffer:1: Element choice is empty ERROR: CXeromyces: Parse error: in_memory_buffer:1: Element choice is empty ERROR: CXeromyces: Parse error: in_memory_buffer:1: Element choice is empty ERROR: CXeromyces: Parse error: in_memory_buffer:1: Element choice is empty ERROR: CXeromyces: Parse error: in_memory_buffer:1: Element choice is empty ERROR: CXeromyces: Parse error: in_memory_buffer:1: Element choice is empty ERROR: CXeromyces: Parse error: in_memory_buffer:1: Element choice is empty ERROR: CXeromyces: Parse error: in_memory_buffer:1: Element choice is empty ERROR: CXeromyces: Parse error: in_memory_buffer:1: Element choice is empty ERROR: CXeromyces: Parse error: in_memory_buffer:1: Element choice is empty ERROR: CXeromyces: Parse error: in_memory_buffer:1: Element choice is empty ERROR: CXeromyces: Parse error: in_memory_buffer:1: Element choice is empty ERROR: CXeromyces: Parse error: in_memory_buffer:1: Element choice is empty ERROR: CXeromyces: Parse error: in_memory_buffer:1: Element choice is empty ERROR: RelaxNGValidator: Failed to compile schema ERROR: JavaScript error: simulation/helpers/Player.js line 36 cmpPlayerManager is null LoadPlayerSettings@simulation/helpers/Player.js:36:19 Stan said: Your template is expecting a choice tag And not finding it <optional> </optional> <optional>{youroptionalelement}</optional> Basically it's useful if you want to add non default behaviours e.g for instance you might say that conversion rate is always 1, and someone might want to override it, but you don''t want to write ConversionRate in all templates. You probably don't need NonConvertibleClasses if you have a whitelist with ConvertibleClasses. That's what Stan said. <Convert> <MaxFaith>100</MaxFaith> <CurrentFaith>100</CurrentFaith> <FaithRegenRate>1</FaithRegenRate> <ConversionCost>50</ConversionCost> <CooldownTime>5000</CooldownTime> <ChancePerSecond>0.05</ChancePerSecond> <Range>20</Range> <ConvertibleClasses>Infantry Cavalry Support</ConvertibleClasses> <NonConvertibleClasses>Hero Mechanical Siege Structure Ship</NonConvertibleClasses> </Convert> Healer XML. Convert tag. I will upload the files when I can. Edited 2 hours ago by Classic-Burger Quote Link to comment Share on other sites More sharing options...
Grapjas Posted 1 hour ago Report Share Posted 1 hour ago (edited) Would be easier if you uploaded your project on github or something. You also need function Convert() {} on line 1, which is likely to solve alot of issues. 1 hour ago, Classic-Burger said: Clean my code from another file, how? I meant you can improve your code by using the tools available Edited 1 hour ago by Grapjas 1 Quote Link to comment Share on other sites More sharing options...
Classic-Burger Posted 1 hour ago Author Report Share Posted 1 hour ago I'm having trouble setting up my GitLab and Git Hub clients. My Git tortoise is very outdated. I'll see when I have my personal computer nearby. I just updated my conver.js or at least I added <optional> again. convert (2).js Sorry to named "(2)" I'm sharing quickly. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.