Posts by red51

    Kannst du nicht schlafen?

    :saint:


    Aber ne Frage habe ich wirklich.

    Ja genau, Strings müssen mit equals() geprüft werden, ob sie übereinstimmen (ansonsten werden bei der == Variante grundsätzlich zwei Objekte auf Gleichheit geprüft (also ob es sich um das gleiche Objekt handelt), und da ein String ein Objekt ist, würde das == nur dann true ausgeben, wenn du exakt dasselbe String-Objekt [also exakt das selbe Objekt, nicht der Text] überprüfst... anders sieht es lediglich bei primitiven Datentypen wie int, float, boolean etc aus, da kannst du problemlos mit == und != prüfen).


    Um die Abfrage nun zu negieren, musst du lediglich das ! davor setzen, also if(!cmd[1].equals("tmn")) ;)

    It's in the world database. Does the server use MySQL or SQLite? If it's SQLite, the world file is in a subfolder the "Worlds" folder in the server directory (if the world is called "MyWorld", the file is named "MyWorld.db" [in a "MyWorld" subfolder]).
    In the world database there is a table called "Player", just delete the particular row that belongs to @Jon_miner


    The world file can be opened with an SQL editor, like Navicat for example.


    But maybe create a backup of the world (at least a backup of the table or the "world.db" file), just in case something goes wrong.


    Alternatively we can prepare a command for the next update to delete a player from the database ;)


    But if you have access to the serverlogs (they can be found in the "Logs" folder), that would be more preferable (it gives at least an indicator if it's really caused by corrupted player data or maybe something else) :) In this case it would be helpful to shutdown the server and restart it, then let @Jon_miner connect to it, and once that failed, check out the "Logs" folder for the latest log file (either upload it here, or send it via PM to me)

    If the server owner deletes my playerdata will I loose my build progress on the server?

    You will only loose your current inventory, and you will also respawn at the default server spawn (so you have to find the way to your home).
    Alternatively a serverlog would be very helpful (containing the moment when you tried to connect).

    I deleted the entire "steam/steamapps/common/RisingWorld" folder and my single player game still was there after re-install??

    Is Steam Cloud Sync enabled? In this case Steam uploads your world to the cloud and downloads it again if it is missing on your client. By default it is enabled, you can either disable it globally in Steam, or per application (to do that, rightclick on RW in your lib -> Properties -> go to the "Updates" tab -> uncheck "Enable Steam Cloud synchronization for Rising World"

    Log file...

    Thanks for the log file :) Everything seems to be fine there... I'm not sure, but it looks like a serverside issue, maybe your playerdata is corrupted (at least if you can connect to other servers without any issues). If you have contact to the serverowner, you can ask him to delete your playerdata in the database.

    Freut mich dass das Problem gelöst ist :)


    Ich bin ja froh das ich das mit dem LUA so eben verstanden habe aber nun stehe ich wieder hier wie der Ochs vorm Berge.

    Ja, das ist leider tatsächlich etwas ungünstig :( Nochmal wird sich die API jedenfalls nicht mehr so grundlegend ändern^^


    Und wo bitte steht in der javadoc.rising-world.net/ was von sendTextMessage, woher weiß man sowas?

    Du findest diese Funktion bei dem jeweiligen Objekt oder der jeweiligen Klasse, zu welcher sie gehört. In dem Fall also zum "Player". Diesen wiederum findest du in dem Package, in welchem er sich befindet (was für eine tolle Formulierung). Um das im Javadoc zu finden, gehst du in diesem Fall also auf net.risingworld.api.objects, und dort auf Player (dort finden sich alle Funktionen, die zum Player gehören, also auch "sendTextMessage()") ;)


    [...] vom veralteten [...] TutMeistensNix

    Das halte ich für ein Gerücht :whistling:

    Danke für den Log! Der war sehr hilfreich, das Problem ist tatsächlich, dass die API dem Classpath fehlt (zumindestens beim Client). Der Eintrag in der "config.properties" ist allerdings schon korrekt, dort muss das JDK angegeben werden.
    Ich habe eine Nightly in Steam hochgeladen, bitte probiere es damit nocheinmal aus. Um sie zu aktivieren, gehe via Rechtsklick auf RW in deiner Steam-Bibliothek -> Eigenschaften -> Betas -> wähle "testbranch - technical" (kein Code benötigt) und schließe das Fenster. Nach dem Download führe RW aus, und versuche erneut, eine Welt zu laden (aber wie gesagt, der Eintrag in der config.properties muss weiterhin den JDK Pfad beinhalten)

    the API is full of bugs

    Of course there can be bugs. I'd recommend to wait for the 1.0 version of Rising World if you don't want to encounter any bugs. However, why is it "full of bugs"? Apparently this is the only API-related bug report you posted? Your previous posts were mainly about SQL issues (if you provide wrong SQL statements it's not a bug in the API) or wrong brackets you've set.
    However, I tested your code, and everything worked as intended (so this isn't even a bug). The textfield is not visible, because you set the size to 0.5 pixels (resulting in some messed up letters, since the text tries to fit into the "0.5x0.5 pixel" area).
    Stop posting this kind of threads. You created a similar topic some time ago. I will lock this topic, feel free to continue the discussion about this particular problem (textfield not shown correctly) in your existing topic.

    It stays on the screen with no message and the dots are not moving.

    In this case maybe try to enable logging, eventually we can see what's going on there. To do that, go to your game directory (rightclick on rw in steam -> properties -> local files -> browse local files), open the config.properties file with a texteditor, set "game_debug_console" to true, save the changes and start the game again. Now connect to the particular server, wait a few seconds (maybe at least 20 or 30 seconds), then quit the game, go to the "Logs" subfolder (in your game directory) and upload the latest log file here :)


    First, when I do a clean install ("Delete Local Content...." in Steam, delete C:\Program Files (x86)\Steam\steamapps\common\RisingWorld, restart, reinstall in Steam), I still have my "Single Player" game... Not sure how that is still there? Is there something else that must be deleted? I did copy the "RisingWorld" folder elsewhere to be able to restore my single player world.

    Yes, Steam does not delete game folders that were created after installation. Since the "Worlds" folder is only created when you create your first world, it does not get deleted. In order to get rid of it, you have to delete the "Rising World" folder in "steam/steamapps/common/" manually


    After a reinstall, if I do "Verify Integrity of Game Cache...", it says "1 file failed to validate and will be reaquired". If I verify again, it says "All files successfully validated". If I then run the game and don't even open any world at all, quit and "Verify Integrity of Game Cache..." again it says "1 file failed to validate and will be reaquired" again???

    That's nothing to worry about. If there is a file which gets reaquired again and again, it's just a configuration file which changes once it's downloaded.

    The 0xRRGGBBAA is a hexadecimal color indeed (RR is the red color part, GG the green color, BB the blue color and AA the alpha part). Alternatively you can use the guiElement.setColor(r, g, b, a) method, there you can provide separate red, green, blue and alpha values (however, the range is between 0.0 and 1.0 in this case, instead of 0 and 255 [in other words, 255 == 1.0, 128 == 0.5 etc]). Example:

    Java
    GuiPanel panel = new GuiPanel();
    //Sets a full red color (i.e. red == 255), half transparent
    panel.setColor(1.0f, 0.0f, 0.0f, 0.5f);

    Please avoid writing whole words in captial letters in the headline, unless it makes sense (e.g. GUI).


    To create a build a gui, simply create a new gui element, and once a player connects to the server (e.g. in the PlayerConnectEvent or PlayerSpawnEvent), add the element to the players gui by calling player.addGuiElement(element)


    Basic example which creates a panel and a label:


    That's strange... maybe post a full log, to do that, enable debug logging in the "config.properties" file in the game directory (set "game_debug_console" to true), save the file, run the game, and once the error occurred, go to the "Logs" folder in your game directory and upload the latest logfile here :)

    Vielleicht kurz vorweg zur string.split() Funktion: Damit wird ein String entsprechend eines bestimmten Trennzeichens aufgeteilt. Das PlayerCommandEvent bietet mit event.getCommand() ja Zugriff auf den vollständigen Command, den der Spieler eingegeben hat (zum Beispiel: "/ban player 60 griefing"). Nun würde, wenn man auf diesen String "split()" anwendet, und als Trennzeichen das Leerzeichen angibt, ein String-Array zurückgegeben, welches die einzelnen Wörter enthält, nämlich "/ban", "player", "60" und "griefing". Das Array hätte eine Länge von 4 (wie bei Programmiersprachen üblich fängt man beim Zugriff darauf aber bei 0 an zu zählen [Lua stellte eine Ausnahme dar, denn hier war der erste Index tatsächlich die 1]) ;)


    Beispiel:


    Wichtig ist immer, wie @Blacky1004 betont hat, vorher die Länge der Eingabe zu prüfen. Zumindestens dann, wenn mehrere Parameter erwartet werden, wie in unserem "/ban" Beispiel. Denn: Man muss auf alles vorbereitet sein, was ein Spieler eingibt. Denn auch wenn hier noch 3 zusätzliche Arugmente erwartet werden (player, 60 und griefing), kann es ja durchaus sein, dass der Spieler lediglich "/ban" eingibt, ohne irgendwelche Zusätze. Darauf muss man also vorbereitet sein, sonst wird eine ArrayIndexOutOfBoundsException geworfen. Momentan wird das zwar alles abgefangen, das heißt das Spiel läuft weiter, allerdings haben Exceptions einen sehr negativen Einfluss auf die Performance.
    Ab dem nächsten Update wird das Spiel beendet, sobald in einem Plugin zu viele Exceptions aufgetreten sind (was man zum Experimentieren natürlich ausschalten kann).


    Es sagt, dass es die Main-Class nicht findet.

    Du versuchst, das Plugin vom Spiel kompilieren zu lassen? Hast du in der config.properties Datei bei "plugins_jdk_path" den Pfad zum JDK angegeben? Hier müssen Escape-Character für Doppelpunkt und Backslashes angegeben werden, also zB plugins_jdk_path=C\:\\Program Files\\Java\\jdk1.8.0_91