fredrico123
-
Posts
3 -
Joined
-
Last visited
-
Feedback
0%
Posts posted by fredrico123
-
-
Wow, it fixed it. Thanks!
-
I am writing a function that checks if a specific player is on my friendslist, and not sure what I am missing in here...
public boolean isFriend(String name) { RS2Widget widget = script.widgets.get(429, 9); if (widget == null) return false; for (RS2Widget friend : widget.getChildWidgets()) { if (friend.getMessage().equals(name)) { return true; } } return false; }
The following code works pretty well if the name is not separated.
Example of a working check: abc123 -> If is on the list, returns true, otherwise, returns false
Example of a non-working check: the king -> this will keep returning false whether or not the player is on my friend list
Thanks in advance!
String comparison problem
in Scripting Help
Posted · Edited by fredrico123
Maybe just one more question, please. How do I know which one to use and when?