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

2018/1/28

Greenfoot.getRandomNumber

Acituanbus Acituanbus

2018/1/28

#
Any idea why this wont work? Greenfoot.getRandomNumber(20,30); It only says "required int" "found int int"
danpost danpost

2018/1/28

#
There is no method with that name that has two int parameters. If you want a number between 20 and 30 inclusive, then use:
20+Greenfoot.getRandomNumber(11)
Lilly123 Lilly123

2018/1/28

#
Perhaps if you post the whole code, someone will find it easier helping you?
Yehuda Yehuda

2018/1/28

#
@Lilly123 Not necessarily. The one line of code that was given is the whole problem. The requirement is an 'int' and the compiler found two. As you posted your message after danpost, you should have been able to see that from there, even if you didn't know the problem by yourself.
xbLank xbLank

2018/1/28

#
Yehuda wrote...
@Lilly123 Not necessarily. The one line of code that was given is the whole problem. The requirement is an 'int' and the compiler found two. As you posted your message after danpost, you should have been able to see that from there, even if you didn't know the problem by yourself.
+1
Yehuda Yehuda

2018/1/28

#
Add 1 to what?
Vercility Vercility

2018/1/28

#
Yehuda wrote...
Add 1 to what?
In case you're not being sarcastic, +1 basically means an upvote (because he agrees to what you said)
Yehuda Yehuda

2018/1/29

#
Yes, but what do any of the users in this discussion do with a "+1". I don't think it helps with the topic.
danpost danpost

2018/1/29

#
Yehuda wrote...
@Lilly123 Not necessarily. The one line of code that was given is the whole problem. The requirement is an 'int' and the compiler found two. As you posted your message after danpost, you should have been able to see that from there, even if you didn't know the problem by yourself.
-1/2 Lilly123 may not have seen my post as there was only about a two minute difference in posting times. As well, Lilly123, may not be familiar with that error message and on top of that, one line of code, in most cases, is not enough to solve an issue (this was a rare case).
xbLank xbLank

2018/1/29

#
Yehuda wrote...
Yes, but what do any of the users in this discussion do with a "+1". I don't think it helps with the topic.
I take my "+1" back. You dont deserve it.
Yehuda Yehuda

2018/1/30

#
I thought I remember seeing one of your posts say "9 hours ago" and the other say "6 hours ago" before I posted, maybe I took too quick of a glance. All your "may"s, besides for the first, have been addressed in my first post. "one line of code ... is the whole problem" "if you didn't know the problem" So that means I already took those into account (even the first).
danpost danpost

2018/1/30

#
Yehuda wrote...
I thought I remember seeing one of your posts say "9 hours ago" and the other say "6 hours ago" before I posted, maybe I took too quick of a glance. All your "may"s, besides for the first, have been addressed in my first post. "one line of code ... is the whole problem" "if you didn't know the problem" So that means I already took those into account (even the first).
I totally understand what you had said. My point is that you went under the presumption that Lilly123 had seen my post and due to that, the problem should have been made known (which is where you used "As you posted your message after danpost, you should have been able to see that from there, even if you didn't know the problem ...". My point is valid, however you try to disprove it.
danpost danpost

2018/1/30

#
@Yehuda, I do not really understand why you had to respond to the post by Lilly123 at all. Better would have been to wait for Acituanbus to reply with a confirmation of a fix or some continued issue, especially when you knew that my reply was probably enough. That way, Lilly123 would find whether the reply given was to point or not (and all this could have been avoided).
Yehuda Yehuda

2018/1/30

#
I think I might agree on that, it is a valid question to (on - ?) my part. It might have been that I thought at the time that what was necessary was someone who knew the problem, and I wanted to stop a lead onto a false trail of posting more code.
You need to login to post a reply.