SA-MP Forums Archive
[MYSQL] Trouble with command - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [MYSQL] Trouble with command (/showthread.php?tid=611804)



[MYSQL] Trouble with command - yutaruta - 11.07.2016

Hi friends, i'm having a trouble with a command...
I scripted a gang system for my server, i write it and tested it on my localhost ubuntu server. The code works great, no problem here.
The trouble is when i upload the gamemode to the hosting, the command does not work.
It sends the "UNKNOWN COMMAND" message, but a custom that i put on OnPlayerCommandPerformed.
The code is the same, the database is the same, the plugins are the same that i have on my local server.
I can't found the problem.
In my local server i used the "mysql_static.so" plugin. On the hosting server, this plugin does not load correctly, so i have to use "mysql.so" instead. Can this be the problem?

Here is the command:

Код:
SOLVED
The command gets the gang id of the player, then gets all users from database who have the same gang id, and do a loop of all this users to put his information on a string, then display all the user list on a dialog


Re: [MYSQL] Trouble with command - Doudou - 11.07.2016

What the version of MySQL are you using?


Re: [MYSQL] Trouble with command - yutaruta - 11.07.2016

I'm using BlueG Mysql/R33

It is very weird, on localhost works well. On the hosting "UNKNOWN COMMAND"
I also checked if the gamemode uploads correctly, and yes.
Also i restarted the server 5 times, but the same.
Is there a difference between mysql.so and mysql_static.so?

im sure that the trouble has something to do with the sql querys.

also the databases has exactly the same structure.


Re: [MYSQL] Trouble with command - yutaruta - 11.07.2016

solved.

the problem was that in the hosting database my test account had the rank of 5, and the array of ranks in my script has size of 5. so the script was trying to acces the element 6 of the array, causing it to return 0 and showing the unkown command error.