Posts by King Nothing

A new update is now available, introducing seasons and more!

    SELECT * FROM XXXXX WHERE Player_user = GetPlayer


    db.executeUpdate("INSERT INTO `XXXXX` (Player_user,PLayer_money) VALUES (GetPlayer, 2000);");



    (GetPLayer is String GetPlayer = p.getName();)



    Caused by: java.sql.SQLException: [SQLITE_ERROR] SQL error or missing database (no such column: GetPlayer)
    at org.sqlite.DB.newSQLException(DB.java:383)
    at org.sqlite.DB.newSQLException(DB.java:387)
    at org.sqlite.DB.throwex(DB.java:374)
    at org.sqlite.NativeDB.prepare(Native Method)
    at org.sqlite.DB.prepare(DB.java:123)
    at org.sqlite.Stmt.executeQuery(Stmt.java:121)
    at pluginapi.objects.SQLiteDatabaseAPI.executeQuery(SourceFile:57)
    at EffNet.EffNet.onConnect(EffNet.java:68)
    ... 8 more

    what I am trying to do is


    type /XXXX and an editable text field with an OK button pops up


    I set the ok button to clickable, but I need the "onGuiElementClickEvent" in order for it to work, I am confused on how to do this.

    I tried Adding a Text Field and all i got was a white Screen
    I tried Adding a database, that gave me errors
    What I am trying to do is NOT possible or the API is full of bugs.


    This Code should NOT make the Screen Completly White


    if any one can chat with me on steam, feel free.

    I'm assuming this is Normal when you add a text Field? i scaled it down and i get a big white screen


    thanks and sorry for the caps, I was just getting frustrated because my database won't work so now I'm working on a different Project and this GUI Thing is getting on my nerves


    and when I think of RGBA I think of
    this: rgba(255, 0, 0, 0.3)


    I don't know where you are coming up with (Oox000000BB) it looks like an extended version of the hexadecimal colors.

    Now the console says "Recpiant is a "Column," it is clearly in the VALUES I've tried everything to write a variable, coukd someone please tell me what the heck I am doing wrong?

    java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at pluginapi.PluginEventHandler.triggerEvent(SourceFile:166)
    at aF.b.a(SourceFile:171)
    at aF.b.messageReceived(SourceFile:121)
    at k.e.a(SourceFile:109)
    at k.c.run(SourceFile:65)
    Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
    at Commands.Commands.onCommand(Commands.java:79)
    ... 9 more
    Mirrawe helped me and I still cannont figure this out....

    package Mail;
    import net.risingworld.api.Plugin;
    import net.risingworld.api.events.EventMethod;
    import net.risingworld.api.events.Listener;
    import net.risingworld.api.events.player.PlayerCommandEvent;
    import net.risingworld.api.objects.Player;
    public class Mail extends Plugin implements Listener{
    @Override
    public void onEnable(){
    registerEventListener(this);
    }
    @Override
    public void onDisable(){
    //...
    }
    @EventMethod
    public void onPlayerCommand(PlayerCommandEvent event){
    Player player = event.getPlayer();
    String command = event.getCommand();
    //split the command
    String[] cmd = command.split(" ");
    //check the command
    if(cmd[0].equals("/mail")){
    //check if player Entered a Recipeant
    if(cmd.length > 1){
    String towhom = command.substring(5);
    player.sendTextMessage("Sent Mail to:" + towhom);
    }


    }
    else{
    //inform player that he has to enter the recpiant
    player.sendTextMessage("[#FF0000]You Need to Specify Who You are Mailing!");
    player.sendTextMessage("[#FF0000]USAGE: /mail UncleBob");


    }


    }



    }


    It will say "Mail sent to: XXXX" but when I just type in "/mail" it won't see the Else Command, it doesn't say anything i the chat