Paycom doesn't seem to be adding a value to commands


#1

when i try to add a value to a command using paycom, and then call that command in chat, it does not increase my point value by any amount. though !pricecom works perfectly :confused:

here is my script from the customCommands.js (its pasted from notepad, so i’m really sorry)

/*
* function priceCom
*
* export $
* param {string} usernamee
* param {string} command
* param {sub} subcommand
* param {bool} isMod
* returns 1 | 0 - Not a boolean
*/
function priceCom(username, command, subCommand, isMod) {
if ((subCommand === ‘’ && $.inidb.exists(‘pricecom’, command)) || $.inidb.exists(‘pricecom’, command + ’ ’ + subCommand)) {
if ((((isMod && $.getIniDbBoolean(‘settings’, ‘pricecomMods’, false) && !$.isBot(username)) || !isMod)) && $.bot.isModuleEnabled(’./systems/pointSystem.js’)) {
if ($.getUserPoints(username) < getCommandPrice(command, subCommand, ‘’)) {
return 1;
}
}
}
return 0;
}

 /*
 * function payCom
 *
 * export $
 * param {string} command
 * returns 1 | 0 - Not a boolean
 */
function payCom(command, subCommand) {
    return ($.inidb.exists('paycom', command) ? 0 : 1);
}

whats going on?


#2

Same Issue Here


#3

Found issue. Working on patch.


#4
points
[12-01-2017 @ 12:21:48.303 MST] [MUTED] @IllusionaryBot,  you currently have 378244 coins and you have been in the chat for  2623 hours and 30 minutes.
payme
[12-01-2017 @ 12:21:50.002 MST] [MUTED] pay me something 100 coins
points
[12-01-2017 @ 12:21:51.828 MST] [MUTED] @IllusionaryBot,  you currently have 378344 coins and you have been in the chat for  2623 hours and 30 minutes.

Resolved, have to run a couple of regression tests though before releasing.


#5

#6

NVM

i found my error. i accidentally hit the keyboard and added a character on a line that should not have been there


#7

Wise man say, take code directly from Git and avoid the fingers of fatness. :slight_smile:

Glad you were able to double check it and that it is working.

Cheers!


#8

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.