Skip to content

Return String (Html) Problem

Featured Replies

Hello i made this

 

public static String stats(final L2PcInstance player)
{
 
final TextBuilder tb = new TextBuilder();
tb.append("<html><title>Casino Manager</title><body>");
tb.append("<center>");
 
tb.append("<center>");
tb.append("Place your bets");
 
tb.append("</tr>");
 
tb.append("</center>");
tb.append("<center><img src=\"L2UI.SquareGray\" width=\"280\" height=\"1\">");
tb.append("</body></html>");
player.sendPacket(ActionFailed.STATIC_PACKET);
 
return tb.toString();
}
 
 
 
i call it but when i call it no html come up >.> the rest code work exept this

Solved by vampir

  • Solution

What do you have near that method call?

It should be something like that:

NpcHtmlMessage msg = new NpcHtmlMessage(0);
msg.setHtml(stats(player));
player.sendPacket(msg);
  • Author

 

What do you have near that method call?

It should be something like that:

NpcHtmlMessage msg = new NpcHtmlMessage(0);
msg.setHtml(stats(player));
player.sendPacket(msg);

sec sir imma try

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.