Jump to content

Recommended Posts

Posted

I am trying to create a 2 dimentional array

however its not showing any values in the config

 

@Config.Name("Post Values")
        @Config.Comment("add post data. \nview the docs for more information")
        public static String[][] postData = {{"username", "someUser"}, {"password","somepass"}};

a 1D array seemed to be completly fine. what am i doing wrong here? Also is there anywhere where i can find more documentation on the config.

the forge docs are seriously lacking when it comes to anything beyond basics.

Screenshot_3.png.7e5299a3cec8ee06abc7fd5a8eecddda.png

 

and a second more offtopic question:

I want my configs to be put in a subfolder but i dont want the path to be shown on the buttons aswell. How would i properly do this?

my current method works, however its anything but pretty

@Config(modid = ScreenshotMain.MODID, category = "Upload Settings", name = ScreenshotMain.MODID+"/serversettings")
    public static class ServerSettings {

        @Config.Name("Link")
        @Config.Comment("Set the link to your image server. ")
        public static String server = "http://example.com/upload.php";

        @Config.Name("Post Values")
        @Config.Comment("add post data. \nview the docs for more information")
        public static String[][] postData = {{"username", "someUser"}, {"password","somepass"}};

    }

Screenshot_4.png.d06baf5bd9b44d033eac41bc0dc80ba2.png

Posted (edited)

Not showing the full path on the buttons is through your .lang file with the full path as the key.

As for the 2D Array I don't think that is possible, and from what I'm seeing can't be added without modifying forge code, why would there need to be more than one login anyway? Two strings should serve you fine.

 

Edit: Also I just noticed where this thread is, this has nothing to do with ForgeGradle and is thus in the wrong place.

Edited by DaemonUmbra
I need to ditch the muscle memory of typing server instead of serve

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

  Reveal hidden contents

 

Posted

Oh uhm. Didnt mean to post it there at all. Anyway thanks for the help. And I just basicly want to let people add s much post data as they want, with both the key and value. using a 2D array for that would make things easier. but i guess i'll have to split the string to get both values.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.