Raised This Month: $51 Target: $400
 12% 

Error help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
RasterMan
Senior Member
Join Date: Mar 2004
Location: Luton, UK
Old 02-17-2011 , 11:04   Error help
Reply With Quote #1

GunGame AMXX 2.13 Beta 4
Just managed to catch this error :

L 02/17/2011 - 15:40:25: Start of error session.
L 02/17/2011 - 15:40:25: Info (map "gg_dusty_fortress") (file "addons/amxmodx/logs/error_20110217.log")
L 02/17/2011 - 15:40:25: [AMXX] Displaying debug trace (plugin "gungame_with_sql.amxx")
L 02/17/2011 - 15:40:25: [AMXX] Run time error 4: index out of bounds
L 02/17/2011 - 15:40:25: [AMXX] [0] gungame_with_sql.sma::show_win_screen (line 6345)


[gungame_with_sql.amxx] Could not execute query [INSERT INTO `gg_winmotd` VALUES ('10','STEAM_0:1:11170595','^_^ Wester - [DK]','1','22','hegrenade','1','0','60','21','0', '0','49','439','0','1298033162','81.19.212.36 :27015');] -- err #1062 [Duplicate entry '10' for key 'PRIMARY']
__________________

Last edited by RasterMan; 02-18-2011 at 11:38.
RasterMan is offline
Send a message via MSN to RasterMan
RasterMan
Senior Member
Join Date: Mar 2004
Location: Luton, UK
Old 02-18-2011 , 13:06   Re: Error help
Reply With Quote #2

I've gone back to beta 3 as beta 4 just crashes too much!
win2003rc2
__________________
RasterMan is offline
Send a message via MSN to RasterMan
jarmenz
Member
Join Date: Feb 2011
Location: Riga, Latvia
Old 02-24-2011 , 07:35   Re: Error help
Reply With Quote #3

If the gungame plugin inserts new record, its a high possibility that the plugin itselft wants to iterate the primary field. The database can handle it correctly. Try to find the INSERT statement in the gungame plugin and check if the inserted value for id field is emty, meaning - '' or null! And then compile the plugin.
__________________
"We view the distant peaks which are our destination with enthusiasm but actually that destination is achieved by the drudgery of single footsteps."
Geoff Burch
jarmenz is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 02-26-2011 , 18:30   Re: Error help
Reply With Quote #4

Thanks for the report. I've fixed the out of bounds error, which probably led to the following SQL error.

Ava
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
DeLsTer
New Member
Join Date: Jul 2010
Old 05-10-2011 , 03:19   Re: Error help
Reply With Quote #5

Could you post the fix? i have a heavily modified version and hate to go back to beta 3 and do all the modifications again
DeLsTer is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 06-14-2011 , 15:29   Re: Error help
Reply With Quote #6

Sure.

Look for these lines in show_win_screen:

Code:
get_gg_authid(player,playerAuthid[player],31); get_user_name(player,playerName[player],31);             // get new stats position stats_clear_struct(playerStats[player]); stats_get_position(player,playerAuthid[player],si);             SQL_QuoteString(db,playerSafeName[player],63,playerName[player]); SQL_QuoteString(db,playerSafeAuthid[player],63,playerAuthid[player]); len += formatex(motd[len],1535-len,"%s('%i','%s','%s','%i','%i','%s','%i','%i','%i','%i','%i','%i','%i','%i','%i','%i','%s')",(len != origLen) ? "," : "",     player,playerSafeAuthid[player],playerSafeName[player],team,level[player],lvlWeapon[player],flags,pointsExtraction[player][0],pointsExtraction[player][2],pointsExtraction[player][1],pointsExtraction[player][4],pointsExtraction[player][3],statsPosition[player][si],floatround(teamTimes[player][winningTeam-1]),floatround(teamTimes[player][losingTeam-1]),systime,serverip);

Change to this:

Code:
get_gg_authid(player,playerAuthid,31); get_user_name(player,playerName,31);             // get new stats position stats_clear_struct(playerStats[player]); stats_get_position(player,playerAuthid,si);             SQL_QuoteString(db,playerSafeName,63,playerName); SQL_QuoteString(db,playerSafeAuthid,63,playerAuthid); len += formatex(motd[len],1535-len,"%s('%i','%s','%s','%i','%i','%s','%i','%i','%i','%i','%i','%i','%i','%i','%i','%i','%s')",(len != origLen) ? "," : "",     player,playerSafeAuthid,playerSafeName,team,level[player],lvlWeapon[player],flags,pointsExtraction[player][0],pointsExtraction[player][2],pointsExtraction[player][1],pointsExtraction[player][4],pointsExtraction[player][3],statsPosition[player][si],floatround(teamTimes[player][winningTeam-1]),floatround(teamTimes[player][losingTeam-1]),systime,serverip);

Ava
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Old 06-15-2011, 03:05
princeli
This message has been deleted by Exolent[jNr]. Reason: Spambot
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:39.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode