Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android Studio problems with custom extensions #679

Open
Alestore opened this issue Apr 17, 2023 · 0 comments
Open

Android Studio problems with custom extensions #679

Alestore opened this issue Apr 17, 2023 · 0 comments

Comments

@Alestore
Copy link

I'm developing a mobile game with TurboWarp, and I thought I'd add some typical error messages like no internet connection (using the dedicated Network TurboWarp extension), checking for updates (comparing two variables using the Fetch extension, one is the installed version which it already put into the project on startup and the other is the updated version, which it checks from a simple text file on the internet in my GitHub on every application startup by pressing the green flag) and the absence of the server (with the same method of the updates by comparing two variables thanks to the Fetch extension, the variable that checks if it is active must be = 0 to activate the message, otherwise using the appropriate TurboWarp extension to ping the Cloud server).

In my Android Studio project I followed the packager guide at #2 and everything works perfectly (I also added the code string that allowed me to activate the JavaScript that I was advised to use at #538), but I have some problems with these messages error that I wanted to implement.

With the Network check extension no problem, everything works perfectly.

With the other two messages, however, I encountered problems.

I hypothesized that it might also be the Fetch extension that didn't work, as well as the ping cloud server extension, given that the variables weren't updated and remained empty when the variable was fed to the Fetch result, and putting them by default identical in the project without using the Fetch extension obviously worked. Also leaving the packager ping extension as further verification of the server, I was getting the error even though the server was up and running (I tested everything in plain HTML and didn't get any type of problem).

I'll leave my code here so you can take a look at it (I also used the LMS Utilities extension but no problem with it, it works absolutely fine).

So first I set the installed version and active server variables to the latest versions (using Fetch because I can't figure out how to make them match in other ways but that's how it works) every time I release a game update. These variables are set in this way only once by me before using the packager so as to make them comparable with the updated variables.

block_17_4_2023-09_10_57

The updated variables are refreshed every time the game is started (so the green flag is pressed), regardless of the version. If the variables do not match with the installed ones, error messages appear.

block_17_4_2023-09_05_04

Any help is appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant