Error publishing with Windows (C) target

I’m attempting to publish the project I’m in the (very) early stages of developing at the moment. While the Windows (Krom) version build and publishes just fine, I get the following errors when attempting to publish the Windows (C) version:

armsdk\armory\Sources/armory/logicnode/SubStringNode.hx:13: characters 16-20 : On static platforms, null can’t be used as basic type Int
armsdk\armory\Sources/armory/logicnode/SubStringNode.hx:13: characters 31-35 : On static platforms, null can’t be used as basic type Int
armsdk\armory\Sources/armory/logicnode/SubStringNode.hx:13: characters 16-20 : On static platforms, null can’t be used as basic type Int
armsdk\armory\Sources/armory/logicnode/SubStringNode.hx:13: characters 31-35 : On static platforms, null can’t be used as basic type Int

I’m not much of a programmer, so I don’t really know what this means. I’m using logic nodes to program at the moment and have dozens of objects with roughly 20 logic node trees across 10 scenes. I’ve looked through all of the properties for each object multiple times as well as the node trees and can’t make heads or tails of where this issue occurring. I ran a test using the default Blender scene that published just fine, and I was able to get it running after putting it through Visual Studio, so I’m guessing it’s an issue with this project specifically.

Any insights would be much appreciated.

The problem is this line of the node: start and end can not be null on target windows c because they are int variables.

replace it with this line:

if (string == null) return null;

it will compile.

Since start and end can never be null that code needs to be erased.

1 Like

Fantastic! That did the trick. I was able to publish the project I was working on from Blender, load it up in Visual Studio, and release it from there.

Now I’m running into a different issue. Following along with the guide I put the exe into the windows-hl folder, but opening that file generated an error before all of the objects had even spawned into the first scene.

By comparison the Krom build works fine. This is what the first scene looks like in the Krom build:

The background loaded as did the ball object, but its outline is white instead of black and much thicker than in the Krom version. The text, character, and cursor images did not seem to spawn. I tried looking into things in Visual Studio, but the debugger didn’t give me any info that I understand.

The only warnings I have in Blender’s console are about scenes not having cameras, but those scenes are just for storing objects.

Any ideas where to go from here?

mmm… it seems your assets did not load. I have seen that error window when sound files try to play but files are missing. Did you put them in the Bundled folder? You can use

and for sounds you need to fake user.

Look in your export project folder if your assets are there… if not… you can also copy them manually.

Thanks again for such a quick reply.

Interesting. I did not know that was another way to get things into the Bundled folder. I currently have not actually added any sounds to this project as I was testing other aspects of design and programming first. Would not adding any sounds cause this issue?

I’m afraid I don’t know which export folder you mean. I have all of my images and fonts added in the Bundled folder, and for this build I see the same images in the debug > krom folder. Additionally I see what I assume are related files with a .k extension in the windows-hl > data folder.

I meant those. Sorry I only get experience with krom and browser export. If you dont have sounds then is not that. But in krom you dont have errors and everything is as you expect? I got lost…

1 Like

Yep, the Windows (Krom) build is playing just fine but the Windows (C) build is not. I test when I’m working on regularly in Krom and even after hitting the publish button and opening up the Krom exe manually it plays as expected.

I might wind up releasing the Krom version of what I’m working on anyway, so the fact that I’ve got that version working is good, I’m just trying to get a grasp of what options are available.

Thanks for all the help.

Krom and html5 get the most support and bug fixing since a lot of users use them.