-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MySQL Errors with latest version #40
Comments
Yes, I broke the game plugin with the latest commits. I'll see if I can fix it this weekend. |
lol - Ok, no problem - Just checking it wasn't me being a n00b ;) lol Love the new WebPanel btw :) Would that explain why no admins have powers in the servers? |
Any fixes for this yet my good man? Can't seem to find any updates that fix it. |
go into sourcebans.sp and find: Format(sQuery, sizeof(sQuery), "SELECT id \
FROM {{servers}} \
WHERE ip = '%s' \
AND port = %i",
g_sServerIp, g_iServerPort);
SB_Query(Query_ServerSelect, sQuery); and change ip to host so it looks like this: Format(sQuery, sizeof(sQuery), "SELECT id \
FROM {{servers}} \
WHERE host = '%s' \
AND port = %i",
g_sServerIp, g_iServerPort);
SB_Query(Query_ServerSelect, sQuery); save and recompile sourcebans.smx, move it from compiled folder into plugins folder and voila. |
After using Wildcard65's fix, I was still getting an error of (Unknown column "ip" in "field list") and needless to say, the plugin was still not working (didn't allow admins access to the sm_admin menu). To fix this, you need to edit line 246 of sourcebans.sp from: Format(sQuery, sizeof(sQuery), "INSERT INTO {{servers}} (ip, port, game_id) \ to: Format(sQuery, sizeof(sQuery), "INSERT INTO {{servers}} (host, port, game_id) \ After this fix, the plugin works 😄 👯 If anyone wants the source/complied plugin you can go to: http://freaky.st0rm.net/sourcebans-fixed and download them 😉 |
My fix only works if you already have the server added to the database. |
@peace-maker can you close this issue? |
Hi, I've downloaded and installed the latest version from GitHub, installation went perfectly, but now I can't access sm_admin even though I've set up myself as a server admin, and I'm getting these lines in the SourceMod logs:
L 04/04/2014 - 10:58:24: [sourcebans.smx] Failed to query database. (Unknown column 'ip' in 'where clause')
L 04/04/2014 - 10:58:29: [sourcebans.smx] Failed to query database. (Cannot add or update a child row: a foreign key constraint fails (
sourcemod
.sb_actions
, CONSTRAINTaction_server
FOREIGN KEY (server_id
) REFERENCESsb_servers
(id
) ON DELETE CASCADE))Am I doing anything wrong, or is this a known issue?
Many thanks!
FreakySt0rm - St0rm.net Gaming
The text was updated successfully, but these errors were encountered: