#variable cant sent through webhook

23 messages · Page 1 of 1 (latest)

gleaming willow
#

so I cant send the string ip even tho its already declared. what do I do to fix this

forest ravineBOT
#

This post has been reserved for your question.

Hey @gleaming willow! 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.

clear kettle
#

What exactly is the error?

#

I would think it’s because the string ip isn’t initialized

marble bramble
#

It's declared in the wrong scope

#

declaring inside a block does not expose the name to the outer scope

#

declare it before the try block

#

initialize inside

gleaming willow
marble bramble
#

declare the variable outside the block before, initialize inside

gleaming willow
#

well i tried it and it still throws an error

#

@marble bramble

marble bramble
#
Type variable = null;
try {
    variable = foo();
} catch ...
bar(variable);
gleaming willow
marble bramble
#

depending on what happens in the catvh block the compiler might complain about the first

gleaming willow
#

one last thing. when i try and run it this shows in the terminal

marble bramble
#

You need to add a log4j provider

gleaming willow
forest ravineBOT
#

💤 Post marked as dormant

This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.