Im building a IRC Bot and came up with a Problem.
Im trying to get the user list, check the amount of tickets each user has and if they got tickets they should be added to the raffle-list(Vector).
Specially with this part i receive the Error:
raffleuserlist.add(ticketquery.getUsers("#"+ownerchannel)[i].getNick());
Error: "Cannot invoke getUsers(String) on the primitive type int"
Whole Code Snippet below.
for(int i = 0; i < this.getUsers("#"+ownerchannel).length; i++){
System.out.println("raffle-user> "+this.getUsers("#"+ownerchannel)[i].getNick());
// User got tickets? Y= Add him to the list N= nothing
ticketquery = MySQLAccess.gettickets(this.getUsers("#"+ownerchannel)[i].getNick());
if(ticketquery >= 1){
raffleuserlist.add(ticketquery.getUsers("#"+ownerchannel)[i].getNick());
}
}
Did i do something wrong? Apreciate any help! :)
You're calling
ticketquery.getUsers
Where you most likely want
this.getUsers
ticketquery
is an int
and does not have any member methods that can be called.