Jump to content
nano mano

last chatbox message

Recommended Posts

9 minutes ago, dreameo said:

According to Alek you want:


chatbox.getMessages().get(0); 

If there is an error, then post the logs. 

@Alek

https://imgur.com/a/S9l0g

from logger I get this java.lang.NullPointerException at org.osbot.rs07.api.Chatbox.getMessages(he:258)

Link to comment
Share on other sites

17 minutes ago, Team Cape said:

Would recommend using onMessage() getMessages() is bugged. How are you trying to print it?

 

Also, my mistake - it should've been getMessages().get(0) not the other way around :D

 

 

 

16 minutes ago, dreameo said:

lol my bad, kinda rushed it but, you want this:


getChatbox().getMessages(Chatbox.MessageType.ALL).get(0);

change type of message if you don't want all.

the only reason you're getting null is because of poor referencing 

 

I tried 

onMessage(Chatbox.MessageType.ALL).get(0)

and 

getChatbox().getMessages(Chatbox.MessageType.ALL).get(0);

 

I get an error from eclipse.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.



  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...