Inter Plug-In Communication

A small new update is available now!
Unfortunately the forums, server list and report tool were offline last night due to technical issues. Sorry for the inconvenience! It should be working again.
However, unfortunately the Standalone update is temporarily not available. We expect it to be fixed in a couple of hours. Please let me know if you want to get a Steam key instead!
  • Hmmm... in line 6 of plug-in A, the attribute value is set to an Integer and in line 1 of plug-in B the retrieved Integer value is cast to a String.


    In fact, I have not clear if such a cast makes sense. Maybe, it is supposed to work, but to be surer, I would retrieve the value as an Integer and either use Integer.toString() in line 3 of plug-in B to convert it to a String or, if you feel lazy, rely in the implicit conversion:


    Code
    Integer value1 = (Integer)player.getAttribute("PlayerTestMoney");
    player.sendTextMessage("Show the Value:" + value1.toString());

    OR

    Code
    Integer value1 = (Integer)player.getAttribute("PlayerTestMoney");
    player.sendTextMessage("Show the Value:" + value1);

    I would prefer to first; also, chances are that sooner or later I'll need a more elaborate String.format() in the message to the player.


    EDIT: Oh well, cross-posting...! 8o

Participate now!

Don’t have an account yet? Create a new account now and be part of our community!