Gustlik501 3 Share Posted November 26, 2016 Guys i'm trying to make a gambling script for my cc. can someone pls tell me whats wrong with this code. My onClanMessage() method: public void onClanMessage(Message message){ PlayerMessage = message.getMessage(); PlayerName = message.getUsername(); } My onLoop(): public int onLoop() { if(PlayerMessage.equalsIgnoreCase("!roll")){ Random num1 = new Random(); int num2 = num1.nextInt(100 - 1 + 1) + 1; getKeyboard().type("/~ "+PlayerName+"Rolled a ["+ num2 +"] on the 100 sided dice."); } return 569; } Link to comment Share on other sites More sharing options...
Banker 175 Share Posted January 8, 2017 Are you getting any errors when running the script? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.