Inconsistent Points functions; several functions don't work


#1

I’ve been using PhantomBot for a long time now and some time ago the bot simply stopped dispersing points. Respective modules are all enabled and I don’t mess with my configuration.

In addition to this, makeitrain and add all refuse to function.

There are no errors logged, and the console reports nothing.

The system works sometimes, but not consistently.


Points and functions still don't work consistently
#2

Hey,

this seems like a bad update, can you try updating to version 2.3.9 again and see if things clear up?

Thanks.


#3

Is there any special process to updating?

Last time I did this, my database disappeared.


#4

Are you sure it didn’t go into the config folder?


#5

Last Friday(13th) I was running a nightly build and the points aren’t dispersing, the all command wasn’t working, etc.

A ‘bad update’ is a what? Does the bot ever need to make changes to the tables? Was there something that was supposed to happen that might not have? I dunno.

Point being though, I don’t know what to check; I’ve written a load of custom code in some modules that use points, but nothing overlaps, command wise. I’m not using any !points related commands.

I wish I could be more help up front, but if there’s something I can look at, I would appreciate any insight. Cheers!


#6

By bad updated I meant a corrupted update, doing something wrong or forgetting a file, seeing that you said that you have other custom modules playing around with points, your table in the database might be corrupted. Try a fresh database as a test and see if it works, if so, the table is corrupted.


#7

So to add context to all this:

My points are called xp, so !xp is my command.

!xp add all 500 doesn’t work. !xp add specificname 500 works perfectly.

Likewise, !makeitrain doesn’t work. It doesn’t give any error that I can see either.

I’m gonna take a look in the database and see if there’s any NaN rows.

If the database was ‘corrupted’ then I should see some evidence of that. Any thoughts?


#8

Depends what type of corruption it is. I’m no SQLite expert so I couldn’t tell you what to look for.


#9

All good my man, I appreciate the responses all the same; I know the policy with night builds :sweat_smile:

Sorry I didn’t have more info; I’ll post back when I know more.


#10

I took a look through the database and nothing filtered to NaN or some such, so I unzipped 2.3.9 into a fresh folder (instead of overwriting the folder as I typically do) and copied over my bits.

After confirming that the commands are now working with one other occupant in my chat, I’m forced to consider this a rectified issue.

My modules are copied in and everything is still working, on points tables that I copied into the database. So effectively it’s all in and working.

I have no idea why :confused:


#11

hammer_370448246_250
Apply directly to forehead.


#12

If you’re on windows (may apply to other OS’s), it’s recommended to not overwrite folders when updating.

Let’s say there was a file called “moduleA.js” that handled a very very specific and niche function.

And then let’s say the developers noticed how redundant it was to have that niche function in it’s own file, so they move the contents over to “main.js” and remove the “moduleA.js”.

When you overwrite the files, it wouldn’t delete “moduleA.js”, but it would update “main.js”. That could easily lead to errors, or something running twice as often as it should be.


#13

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