#Weird issue

13 messages · Page 1 of 1 (latest)

mystic gate
#

I am having a problem with my "noun1" string and command

Does anyone know what the problem is?

glossy furnaceBOT
#

This post has been reserved for your question.

Hey @mystic gate! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

ashen oracle
#

hover over the warnings to see what the ide is complaining about

#

looks like it's because you never initialized noun1 or adjective3

mystic gate
#

thats the thing, Initializing it wont do anything

#

expect making x = null

#

which makes the variable nothing

ashen oracle
#

but just read the error

foggy onyx
#

You do not seem to have initialized noun1, if you did make sure it is before any time you are using it as java does not hoist variables like in javascript. I also suggest you look into String.format() to get rid of the ugly appends everywhere.

#

To get back to the initialization problem in your code you never set noun1 to anything, so the program gives an error because it can not work with null.

#

Just get the input from the user and set it to noun1 and you should be good!