What would stop the same code from running on different systems?

Ive noticed this a couple of times:

Code works fine on computer a but wont work on computer b, and sometimes vice versa.

This just happened again some one asked me if I could help them. I took their zipped project code and it was a very minor fix and it runs perfectly on my system. But on their system not at all- the messages are not being sent.

And the reverse happened to me yesterday code would run on a different person’s computer but not on mine.

This makes helping or getting help more difficult becuase it becomes a “is this my code” or “is this my system.” and one can spend hours trying to fix code that is perfectly fine.

Hey JB,

Do you have an example of this? What error messages are thrown in the console, if any, same operating system on both computers, etc? Errors that prevent building the game, or errors during runtime?

Well today. It threw no errors. It just never sent the message from gui script to the loader script, but on my system it worked fine. Both windows 10 computers and latest ver of defold. I cant post the code because its not my code and he wants it private.

Im not trying to fix this problem per se as much as understand why it happens so I can avoid in future.

So was it an error at runtime, or an error that prevented the build (it sounds like the former). If it’s a runtime issue, it increases the variables. For instance, with a gui, you could have a hidden system mouse cursor and use a cursor sprite following the mouse instead. In different resolutions or window sizes, if this is not accounted for, the cursor position you SEE may not be the actual cursor position. If you were to click on a gui button, for instance, you might not actually be clicking on it.

To speak to the initial question, i believe, i don’t think there’s enough information here to know what or why happened. My understanding and experience with Defold over several years is that cross-platform truly is cross-platform, with the obvious exceptions of touch vs mouse-click, screen resolutions, etc. Between 2 Windows computers running a native app (not html5 where browsers might come in to play, etc) i have never experienced, nor should there be, discrepancies in code.

3 Likes

Thanks. :slight_smile: I suspected the same thing about the gui situation.

If you sus out the problem, or are further confounded by it, please post the solution or more detail. It would definitely be helpful to most folks.

Well he opened a separate post talking about how it doesnt work for him: