Minecraft MySQL | Parameter index out of range (3> number of parameters, which is 2) error, how should I fix this error?

da
1

First of all I want to say that I started with MySQL. Please do not write me something like "deal with MySQL" since I have already searched for the error on the Internet, but I can't find a solution to my problem.

I work with the IntelliJ Idea program from JetBrains.

What is it about?:

I tried to program a point system (later to become a coin system). I use the Spigot API 1.8. Then of course I added the command / points and / points add to test. The command / points works. With / points add I can only execute the command once, which means that I got 1 point more from 0 points with the / points add command. But when I run this command again, the error pops up:

Parameter index out of range (3> number of parameters, which is 2)

in my console.

I hope you got it xD. Here are a few screenshots:

The password for the pictures is: Ineedhelp

Screenshot number 1 (unfortunately only for download or preview):

https://workupload.com/file/PnZAqrc2VpW

Screenshot number 2 (unfortunately only for download or preview):

https://workupload.com/file/ujN8njva2s8

Screenshot number 3 (unfortunately only for download or preview):

https://workupload.com/file/dsgedMzTwqR

Screenshot number 3.2 (the continuation of the class) (unfortunately only for download or preview):

https://workupload.com/file/XyTbyGBrHWr

Screenshot number 4 (unfortunately only for download or preview):

https://workupload.com/file/tgkDZtpmPQa

Screenshot number 5 (unfortunately only for download or preview):

https://workupload.com/file/Yv8mVJWreh3

Hope you can help me quickly.

Bu

Check out MySQLPoints.update for your first prepared statement. In this I count two question marks, i.e. Two placeholders that are set. However, you are trying to insert three specific values (and also in the wrong order).

Your statement should look like this:

UPDATE PointsSystem SET Points = Points + 1 WHERE UUID =?

That means that only one placeholder needs to be operated.

Gaming PC config? cu cutenimble
MySQL Access denied? Br Bright507