generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: PM Bot

Previous Thread :: Next Thread 
JCOneManArmy is not online. JCOneManArmy
Joined: 22 May 2015
Total Posts: 17
24 Nov 2015 11:31 PM
I get an error saying 'SyntaxError: missing } after property list'

What is wrong with the following script?

var waitTime = 5; // In seconds
var group = 0; // 0 for no group check, otherwise people in this group will not receive the message
function sendMsg(userId, username) {
function send() {
$.post("http://www.roblox.com/messages/send",{
subject: 'Join the Empire! || John's Cobras',
body: 'Hello, ' + username + '.\n\n You are being called to join the mighty empire of John's Cobras! \n\n Why should you join us? Three reasons: \n\n 1. It would be an honor to have such a powerful soldier like you! \n\n 2. We will enjoy your company and combat skills! \n\n 3. We will rise back up, Hail the Phoenix Era. \n\n Join the mighty army here!: \n\n http://www.roblox.com/Groups/Group.aspx?gid=72043 \n\n Thank you for reading, please reply to this message if you have decided to join. We look forward to seeing you at the next event! ',
recipientid: userId,
cacheBuster: new Date().getTime()
}).done(function(response) {
if (response.success == true) {
console.log('Sent message to ' + username + ' (' + userId + ')');
} else {
console.log('Error sending to ' + username + ': ' + response.shortMessage);
}
});
}
if (group > 0) {
$.get("http://www.roblox.com/Game/LuaWebService/HandleSocialRequest.ashx?method=IsInGroup&playerid=" + userId + "&groupid=" + group, function(response) {
if(response.indexOf('true') == -1) {
send();
} else {
console.log('Didn\'t send a message to ' + username + ' because he is already in group ' + group + '.');
}
});
} else {
send();
}
}

function run() {
var timeout = 0;
var elements = document.evaluate('//div[contains(@id,\'ctl00_cphRoblox_rbxGroupRoleSetMembersPane_GroupMembersUpdatePanel\')]//div[contains(@class,\'GroupMember\')]//span[contains(@class,\'Name\')]/a',document,null,XPathResult.UNORDERED_NODE_ITERATOR_TYPE,null);
var currentNode = elements.iterateNext();
while (currentNode) {
(function(time,id,name) {
setTimeout(sendMsg,time,id,name);
})(timeout,currentNode.href.match(/\d+/)[0],currentNode.textContent);
timeout+=waitTime*1000;
currentNode = elements.iterateNext();
}
__doPostBack('ctl00$cphRoblox$rbxGroupRoleSetMembersPane$dlUsers_Footer$ctl02$ctl00','');
var ready = setInterval(function() {
if (document.getElementById('__EVENTTARGET').value == "") {
clearInterval(ready);
setTimeout(run,timeout);
}
}, 10);
}
var ready = setInterval(function() {
if (document.readyState === "complete") {
clearInterval(ready);
run();
}
}, 10);


John's Cobras Arch Commander WarResurrection
Report Abuse
JCOneManArmy is not online. JCOneManArmy
Joined: 22 May 2015
Total Posts: 17
24 Nov 2015 11:34 PM
Bump, I need help.



John's Cobras Arch Commander WarResurrection
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
24 Nov 2015 11:34 PM
You're missing a brace.
Report Abuse
XIIGhostHelper is not online. XIIGhostHelper
Joined: 29 Oct 2014
Total Posts: 1026
24 Nov 2015 11:36 PM
By making the PM yourself


http://www.roblox.com/sIGGY-1-item?id=322963980 http://www.roblox.com/Siggy-item?id=322963948
Report Abuse
JCOneManArmy is not online. JCOneManArmy
Joined: 22 May 2015
Total Posts: 17
24 Nov 2015 11:36 PM
It says I am, but I have no clue where, I am trying to figure out where it should be placed.




John's Cobras Arch Commander WarResurrection
Report Abuse
JCOneManArmy is not online. JCOneManArmy
Joined: 22 May 2015
Total Posts: 17
24 Nov 2015 11:43 PM
Where am I missing a }, I am getting irritable.



John's Cobras Arch Commander WarResurrection
Report Abuse
XIIGhostHelper is not online. XIIGhostHelper
Joined: 29 Oct 2014
Total Posts: 1026
24 Nov 2015 11:43 PM
learn 2 java


http://www.roblox.com/sIGGY-1-item?id=322963980 http://www.roblox.com/Siggy-item?id=322963948
Report Abuse
ColdUndermined is not online. ColdUndermined
Joined: 25 Jan 2010
Total Posts: 1819
24 Nov 2015 11:45 PM
I don't want to help for the simple fact that you are creating a group join invite auto-send system. Those people are insanely annoying.


-|| Don't walk the path someone else made, build your own. ||-
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image