This site requires JavaScript, please enable it in your browser!
Greenfoot back
Roshan123
Roshan123 wrote ...

2021/4/27

Scenario gives error in website but not in app

1
2
3
Roshan123 Roshan123

2021/4/27

#
Why It stops running? 1st thing which i did was I clicked on 'Auto Play' and then i clicked on 'Duo'....but it stops running note that the tank named 'enemy' should die when u clicked on 'auto play' If 'enemy' died then click on 'back' and then on 'duo' it only occurs in website and not in app. No errors are given in the application
Roshan123 Roshan123

2021/4/28

#
Is their any way to get to know what errors r given(and also in which class and the line number) while its running in website???
danpost danpost

2021/4/28

#
You do have a conditional "Greenfoot.stop();" in your codes. Maybe it is getting triggered?
RcCookie RcCookie

2021/4/28

#
Right-click on the website background, select „Inspect“ and Switch to the tab Console. I suppose there’s an exception.
Roshan123 Roshan123

2021/4/29

#
RcCookie wrote...
Right-click on the website background, select „Inspect“ and Switch to the tab Console. I suppose there’s an exception.
I m hardly able to understand the language written in it or u can say i didn't understand anything. It would be better for me to find another way out
Roshan123 Roshan123

2021/4/29

#
danpost wrote...
You do have a conditional "Greenfoot.stop();" in your codes. Maybe it is getting triggered?
But why not in app??? If their is any other thing which makes u feel wierd then do comment it out asap
danpost danpost

2021/4/29

#
Roshan123 wrote...
If their is any other thing which makes u feel wierd then do comment it out asap
Didn't see anything. However, again, cannot see or test all classes. In fact, cannot even open it in the greenfoot app (which could be considered kind of weird).
RcCookie RcCookie

2021/4/29

#
Roshan123 wrote...
I m hardly able to understand the language written in it or u can say i didn't understand anything. It would be better for me to find another way out
Basically just skip the warnings in the console and check if it says something about an error on javascript. For example it likes to throw something like „JavaScriptReferenceError - ClassDefNotFound is not defined“. In that case your code uses a class that is not in the online version available. Have you made any other imports besides „import greenfoot.*;“?
RcCookie RcCookie

2021/4/29

#
Anyways, I’m commonly having trouble with online versions of the game not running properly. Sometimes it’s throwing errors during the game causing it to pause like on yours, sometimes it shows a blackscreen, sometimes it only loads half the world and fails, sometimes the whole world just does not load at all and you only see a black border, and sometimes it literally behaves differently online, ever things like adding strings. This is because online the scenario is not running in have, but as an automated conversion to javascript which can run on a browser. Unfortunately the conversion is quite bad and does not have a lot of the classes you have in full java.
Roshan123 Roshan123

2021/4/30

#
danpost wrote...
Didn't see anything. However, again, cannot see or test all classes. In fact, cannot even open it in the greenfoot app (which could be considered kind of weird).
I would like to request you to inform me that u agree to my condition or not I want to share the source code in zip extension with the help of dropbox and it will be locked. The password will be given with the help of ur scenario i.e. private message
RcCookie RcCookie

2021/4/30

#
Why don’t you share it via Greenfoot? You can add a license of you are worried, google for „MIT License“
RcCookie RcCookie

2021/4/30

#
I can also check weather I find something in the console (later)
Roshan123 Roshan123

2021/5/1

#
RcCookie wrote...
I can also check weather I find something in the console (later)
1st of all i don't have any idea abt Mit lisence 2nd I don't want the 4 class to be publicly visible If u don't mind can i share u the whole source code privately in ur discord???
RcCookie RcCookie

2021/5/1

#
That’s also an option
RcCookie RcCookie

2021/5/1

#
On Firefox and Chrome you can also hit "CTRL+SHIFT+I" to open the inspection page, then simply select "Console" of the tabs. Anyways, this it said:
> java.lang.RuntimeException: (JavaScript) TypeError: $this is null
Do you have a method named "Crate_act" in which you set the image of the actor?
There are more replies on the next page.
1
2
3