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

[THC RPG] Total HardCore RPG


Post New Thread Reply   
 
Thread Tools Display Modes
gamemann
Veteran Member
Join Date: Sep 2009
Location: Mullica Hill, New Jersey
Old 04-05-2011 , 17:04   Re: [THC RPG] Total HardCore RPG
Reply With Quote #501

............................................. .......Anyone want to add new upgrades to this?
__________________
Software/network engineer. I often work on a neat project called The Modding Community.

Check out my GitHub here!
gamemann is offline
Send a message via Skype™ to gamemann
kaskull
Member
Join Date: Nov 2010
Old 04-06-2011 , 11:03   Re: [THC RPG] Total HardCore RPG
Reply With Quote #502

I've send you a PM
__________________
kaskull is offline
Send a message via Skype™ to kaskull
gamemann
Veteran Member
Join Date: Sep 2009
Location: Mullica Hill, New Jersey
Old 04-07-2011 , 22:01   Re: [THC RPG] Total HardCore RPG
Reply With Quote #503

Quote:
Originally Posted by kaskull View Post
I've send you a PM
k thanks!
__________________
Software/network engineer. I often work on a neat project called The Modding Community.

Check out my GitHub here!
gamemann is offline
Send a message via Skype™ to gamemann
arsirc
Veteran Member
Join Date: Dec 2007
Location: Carinthia,Austria,Earth
Old 04-12-2011 , 07:08   Re: [THC RPG] Total HardCore RPG
Reply With Quote #504

try the newest code snapshot ... i think i got the sql problems fixed ... please give feedback

Last edited by arsirc; 04-12-2011 at 07:58.
arsirc is offline
gamemann
Veteran Member
Join Date: Sep 2009
Location: Mullica Hill, New Jersey
Old 04-12-2011 , 21:22   Re: [THC RPG] Total HardCore RPG
Reply With Quote #505

Quote:
Originally Posted by arsirc View Post
try the newest code snapshot ... i think i got the sql problems fixed ... please give feedback
just got the code testing for my server now
__________________
Software/network engineer. I often work on a neat project called The Modding Community.

Check out my GitHub here!

Last edited by gamemann; 04-12-2011 at 21:34.
gamemann is offline
Send a message via Skype™ to gamemann
gamemann
Veteran Member
Join Date: Sep 2009
Location: Mullica Hill, New Jersey
Old 04-12-2011 , 21:50   Re: [THC RPG] Total HardCore RPG
Reply With Quote #506

Quote:
Originally Posted by arsirc View Post
try the newest code snapshot ... i think i got the sql problems fixed ... please give feedback
THANKS YOU SO MUCH
u diffidently fixed lag issues
But do you think you can fix speed++?
and can you also make it so people don't level up so fast or atleast create an option for it?
thanks,
gamemann

btw: when i compiled the plugin with those new added codes, i put in ur new code for(wrappers.inc,hgversion.inc,and sql.inc) and had a few problems saying
Code:
 Undefined symbol: CreateSqlTable();
and something like that...
But i fixed it by just deleteing it from the file
thanks again

some errors in log(the sql: ones are u the other core.inc errors are from me ;) )
Code:
L 04/12/2011 - 18:40:28: SourceMod error session started
L 04/12/2011 - 18:40:28: Info (map "") (file "errors_20110412.log")
L 04/12/2011 - 18:40:28: Failed lookup of gEntList directly - Reverting to lookup via LevelShutdown
L 04/12/2011 - 18:40:31: Error log file session closed.
L 04/12/2011 - 18:40:33: SourceMod error session started
L 04/12/2011 - 18:40:33: Info (map "ze_predator_ultimate_v1_3") (file "errors_20110412.log")
L 04/12/2011 - 18:40:33: [UPDATER] --- BEGIN ERRORS FROM AUTOMATIC UPDATER ---
L 04/12/2011 - 18:40:33: [UPDATER] Could not download "http://update.sourcemod.net/update/"
L 04/12/2011 - 18:40:33: [UPDATER] Error: The requested URL returned error: 404
L 04/12/2011 - 18:40:33: [UPDATER] --- END ERRORS FROM AUTOMATIC UPDATER ---
L 04/12/2011 - 18:40:33: [mapchooser.smx] Unable to create a valid map list.
L 04/12/2011 - 18:40:33: [SM] Native "SQL_Query" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 18:40:33: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 18:40:33: [SM]   [0]  Line 514, thc_rpg/sql.inc::CheckDBUpdate()
L 04/12/2011 - 18:40:33: [SM]   [1]  Line 264, thc_rpg/core.inc::Core_OnConfigsExecuted()
L 04/12/2011 - 18:40:53: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 18:40:53: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 18:40:53: [SM]   [0]  Line 291, thc_rpg/sql.inc::LoadPlayerData()
L 04/12/2011 - 18:40:53: [SM]   [1]  Line 276, thc_rpg/core.inc::Core_OnClientAuthorized()
L 04/12/2011 - 18:41:44: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 18:41:44: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 18:41:44: [SM]   [0]  Line 387, thc_rpg/sql.inc::SavePlayerData()
L 04/12/2011 - 18:41:44: [SM]   [1]  Line 286, thc_rpg/core.inc::Core_OnClientDisconnect()
L 04/12/2011 - 18:41:44: [SM] Native "GetClientName" reported: Client 1 is not connected
L 04/12/2011 - 18:41:44: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 18:41:44: [SM]   [0]  Line 371, thc_rpg/sql.inc::SavePlayerData()
L 04/12/2011 - 18:41:44: [SM]   [1]  Line 244, thc_rpg/core.inc::Core_OnMapEnd()
L 04/12/2011 - 18:41:45: Error log file session closed.
L 04/12/2011 - 18:41:46: SourceMod error session started
L 04/12/2011 - 18:41:46: Info (map "ze_lab101_v2") (file "errors_20110412.log")
L 04/12/2011 - 18:41:46: [mapchooser.smx] Unable to create a valid map list.
L 04/12/2011 - 18:41:46: [SM] Native "SQL_Query" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 18:41:46: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 18:41:46: [SM]   [0]  Line 514, thc_rpg/sql.inc::CheckDBUpdate()
L 04/12/2011 - 18:41:46: [SM]   [1]  Line 264, thc_rpg/core.inc::Core_OnConfigsExecuted()
L 04/12/2011 - 18:41:46: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 18:41:46: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 18:41:46: [SM]   [0]  Line 291, thc_rpg/sql.inc::LoadPlayerData()
L 04/12/2011 - 18:41:46: [SM]   [1]  Line 276, thc_rpg/core.inc::Core_OnClientAuthorized()
L 04/12/2011 - 18:42:01: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 18:42:01: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 18:42:01: [SM]   [0]  Line 291, thc_rpg/sql.inc::LoadPlayerData()
L 04/12/2011 - 18:42:01: [SM]   [1]  Line 276, thc_rpg/core.inc::Core_OnClientAuthorized()
L 04/12/2011 - 18:42:01: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 18:42:01: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 18:42:01: [SM]   [0]  Line 387, thc_rpg/sql.inc::SavePlayerData()
L 04/12/2011 - 18:42:01: [SM]   [1]  Line 306, thc_rpg/core.inc::Core_RoundEnd()
L 04/12/2011 - 18:42:01: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 18:42:01: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 18:42:01: [SM]   [0]  Line 291, thc_rpg/sql.inc::LoadPlayerData()
L 04/12/2011 - 18:42:01: [SM]   [1]  Line 276, thc_rpg/core.inc::Core_OnClientAuthorized()
L 04/12/2011 - 18:42:01: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 18:42:01: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 18:42:01: [SM]   [0]  Line 291, thc_rpg/sql.inc::LoadPlayerData()
L 04/12/2011 - 18:42:01: [SM]   [1]  Line 276, thc_rpg/core.inc::Core_OnClientAuthorized()
L 04/12/2011 - 18:42:02: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 18:42:02: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 18:42:02: [SM]   [0]  Line 291, thc_rpg/sql.inc::LoadPlayerData()
L 04/12/2011 - 18:42:02: [SM]   [1]  Line 276, thc_rpg/core.inc::Core_OnClientAuthorized()
L 04/12/2011 - 18:42:02: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 18:42:02: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 18:42:02: [SM]   [0]  Line 291, thc_rpg/sql.inc::LoadPlayerData()
L 04/12/2011 - 18:42:02: [SM]   [1]  Line 276, thc_rpg/core.inc::Core_OnClientAuthorized()
L 04/12/2011 - 18:43:03: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 18:43:03: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 18:43:03: [SM]   [0]  Line 387, thc_rpg/sql.inc::SavePlayerData()
L 04/12/2011 - 18:43:03: [SM]   [1]  Line 306, thc_rpg/core.inc::Core_RoundEnd()
L 04/12/2011 - 18:43:21: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 18:43:21: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 18:43:21: [SM]   [0]  Line 291, thc_rpg/sql.inc::LoadPlayerData()
L 04/12/2011 - 18:43:21: [SM]   [1]  Line 287, thc_rpg/admincmds.inc::AdminCmd_ResetAllPlayers()
L 04/12/2011 - 18:45:17: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 18:45:17: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 18:45:17: [SM]   [0]  Line 387, thc_rpg/sql.inc::SavePlayerData()
L 04/12/2011 - 18:45:17: [SM]   [1]  Line 306, thc_rpg/core.inc::Core_RoundEnd()
L 04/12/2011 - 18:47:13: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 18:47:13: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 18:47:13: [SM]   [0]  Line 387, thc_rpg/sql.inc::SavePlayerData()
L 04/12/2011 - 18:47:13: [SM]   [1]  Line 306, thc_rpg/core.inc::Core_RoundEnd()
L 04/12/2011 - 18:48:21: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 18:48:21: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 18:48:21: [SM]   [0]  Line 387, thc_rpg/sql.inc::SavePlayerData()
L 04/12/2011 - 18:48:21: [SM]   [1]  Line 286, thc_rpg/core.inc::Core_OnClientDisconnect()
L 04/12/2011 - 18:48:21: [SM] Native "GetClientTeam" reported: Client 1 is not in game
L 04/12/2011 - 18:48:21: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 18:48:21: [SM]   [0]  Line 307, thc_rpg/core.inc::Core_RoundEnd()
L 04/12/2011 - 18:51:47: SourceMod error session started
L 04/12/2011 - 18:51:47: Info (map "") (file "errors_20110412.log")
L 04/12/2011 - 18:51:47: Failed lookup of gEntList directly - Reverting to lookup via LevelShutdown
L 04/12/2011 - 18:51:50: Error log file session closed.
L 04/12/2011 - 18:51:52: SourceMod error session started
L 04/12/2011 - 18:51:52: Info (map "ze_predator_ultimate_v1_3") (file "errors_20110412.log")
L 04/12/2011 - 18:51:52: [UPDATER] --- BEGIN ERRORS FROM AUTOMATIC UPDATER ---
L 04/12/2011 - 18:51:52: [UPDATER] Could not download "http://update.sourcemod.net/update/"
L 04/12/2011 - 18:51:52: [UPDATER] Error: The requested URL returned error: 404
L 04/12/2011 - 18:51:52: [UPDATER] --- END ERRORS FROM AUTOMATIC UPDATER ---
L 04/12/2011 - 18:51:52: [mapchooser.smx] Unable to create a valid map list.
L 04/12/2011 - 18:51:52: [SM] Native "SQL_Query" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 18:51:52: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 18:51:52: [SM]   [0]  Line 514, thc_rpg/sql.inc::CheckDBUpdate()
L 04/12/2011 - 18:51:52: [SM]   [1]  Line 264, thc_rpg/core.inc::Core_OnConfigsExecuted()
L 04/12/2011 - 18:53:30: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 18:53:30: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 18:53:30: [SM]   [0]  Line 291, thc_rpg/sql.inc::LoadPlayerData()
L 04/12/2011 - 18:53:30: [SM]   [1]  Line 276, thc_rpg/core.inc::Core_OnClientAuthorized()
L 04/12/2011 - 18:54:09: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 18:54:09: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 18:54:09: [SM]   [0]  Line 387, thc_rpg/sql.inc::SavePlayerData()
L 04/12/2011 - 18:54:09: [SM]   [1]  Line 286, thc_rpg/core.inc::Core_OnClientDisconnect()
L 04/12/2011 - 18:54:09: [SM] Native "GetClientName" reported: Client 1 is not connected
L 04/12/2011 - 18:54:09: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 18:54:09: [SM]   [0]  Line 371, thc_rpg/sql.inc::SavePlayerData()
L 04/12/2011 - 18:54:09: [SM]   [1]  Line 244, thc_rpg/core.inc::Core_OnMapEnd()
L 04/12/2011 - 18:54:10: Error log file session closed.
L 04/12/2011 - 18:54:12: SourceMod error session started
L 04/12/2011 - 18:54:12: Info (map "ze_lab101_v2") (file "errors_20110412.log")
L 04/12/2011 - 18:54:12: [mapchooser.smx] Unable to create a valid map list.
L 04/12/2011 - 18:54:12: [SM] Native "SQL_Query" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 18:54:12: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 18:54:12: [SM]   [0]  Line 514, thc_rpg/sql.inc::CheckDBUpdate()
L 04/12/2011 - 18:54:12: [SM]   [1]  Line 264, thc_rpg/core.inc::Core_OnConfigsExecuted()
alot of those logs are from the sql being wrong too btw ;) but it does work ingame!
__________________
Software/network engineer. I often work on a neat project called The Modding Community.

Check out my GitHub here!

Last edited by gamemann; 04-12-2011 at 21:56.
gamemann is offline
Send a message via Skype™ to gamemann
gamemann
Veteran Member
Join Date: Sep 2009
Location: Mullica Hill, New Jersey
Old 04-12-2011 , 22:02   Re: [THC RPG] Total HardCore RPG
Reply With Quote #507

lag issue fixed but another issue reported that was working before u fixed the sql.inc.etc

Now it wont either load the players data or save players data....
log:
Code:
L 04/12/2011 - 18:59:02: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 18:59:02: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 18:59:02: [SM]   [0]  Line 291, thc_rpg/sql.inc::LoadPlayerData()
L 04/12/2011 - 18:59:02: [SM]   [1]  Line 276, thc_rpg/core.inc::Core_OnClientAuthorized()
L 04/12/2011 - 18:59:26: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 18:59:26: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 18:59:26: [SM]   [0]  Line 291, thc_rpg/sql.inc::LoadPlayerData()
L 04/12/2011 - 18:59:26: [SM]   [1]  Line 276, thc_rpg/core.inc::Core_OnClientAuthorized()
L 04/12/2011 - 18:59:26: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 18:59:26: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 18:59:26: [SM]   [0]  Line 387, thc_rpg/sql.inc::SavePlayerData()
L 04/12/2011 - 18:59:26: [SM]   [1]  Line 306, thc_rpg/core.inc::Core_RoundEnd()
L 04/12/2011 - 18:59:27: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 18:59:27: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 18:59:27: [SM]   [0]  Line 291, thc_rpg/sql.inc::LoadPlayerData()
L 04/12/2011 - 18:59:27: [SM]   [1]  Line 276, thc_rpg/core.inc::Core_OnClientAuthorized()
L 04/12/2011 - 18:59:27: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 18:59:27: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 18:59:27: [SM]   [0]  Line 291, thc_rpg/sql.inc::LoadPlayerData()
L 04/12/2011 - 18:59:27: [SM]   [1]  Line 276, thc_rpg/core.inc::Core_OnClientAuthorized()
L 04/12/2011 - 18:59:27: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 18:59:27: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 18:59:27: [SM]   [0]  Line 291, thc_rpg/sql.inc::LoadPlayerData()
L 04/12/2011 - 18:59:27: [SM]   [1]  Line 276, thc_rpg/core.inc::Core_OnClientAuthorized()
L 04/12/2011 - 18:59:28: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 18:59:28: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 18:59:28: [SM]   [0]  Line 291, thc_rpg/sql.inc::LoadPlayerData()
L 04/12/2011 - 18:59:28: [SM]   [1]  Line 276, thc_rpg/core.inc::Core_OnClientAuthorized()
L 04/12/2011 - 18:59:28: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 18:59:28: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 18:59:28: [SM]   [0]  Line 291, thc_rpg/sql.inc::LoadPlayerData()
L 04/12/2011 - 18:59:28: [SM]   [1]  Line 276, thc_rpg/core.inc::Core_OnClientAuthorized()
L 04/12/2011 - 19:00:22: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 19:00:22: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:00:22: [SM]   [0]  Line 387, thc_rpg/sql.inc::SavePlayerData()
L 04/12/2011 - 19:00:22: [SM]   [1]  Line 286, thc_rpg/core.inc::Core_OnClientDisconnect()
L 04/12/2011 - 19:00:22: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 19:00:22: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:00:22: [SM]   [0]  Line 387, thc_rpg/sql.inc::SavePlayerData()
L 04/12/2011 - 19:00:22: [SM]   [1]  Line 286, thc_rpg/core.inc::Core_OnClientDisconnect()
L 04/12/2011 - 19:00:22: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 19:00:22: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:00:22: [SM]   [0]  Line 387, thc_rpg/sql.inc::SavePlayerData()
L 04/12/2011 - 19:00:22: [SM]   [1]  Line 286, thc_rpg/core.inc::Core_OnClientDisconnect()
L 04/12/2011 - 19:00:22: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 19:00:22: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:00:22: [SM]   [0]  Line 387, thc_rpg/sql.inc::SavePlayerData()
L 04/12/2011 - 19:00:22: [SM]   [1]  Line 286, thc_rpg/core.inc::Core_OnClientDisconnect()
L 04/12/2011 - 19:00:22: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 19:00:22: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:00:22: [SM]   [0]  Line 387, thc_rpg/sql.inc::SavePlayerData()
L 04/12/2011 - 19:00:22: [SM]   [1]  Line 286, thc_rpg/core.inc::Core_OnClientDisconnect()
L 04/12/2011 - 19:00:22: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 19:00:22: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:00:22: [SM]   [0]  Line 291, thc_rpg/sql.inc::LoadPlayerData()
L 04/12/2011 - 19:00:22: [SM]   [1]  Line 276, thc_rpg/core.inc::Core_OnClientAuthorized()
L 04/12/2011 - 19:00:22: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 19:00:22: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:00:22: [SM]   [0]  Line 387, thc_rpg/sql.inc::SavePlayerData()
L 04/12/2011 - 19:00:22: [SM]   [1]  Line 286, thc_rpg/core.inc::Core_OnClientDisconnect()
L 04/12/2011 - 19:00:22: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 19:00:22: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:00:22: [SM]   [0]  Line 387, thc_rpg/sql.inc::SavePlayerData()
L 04/12/2011 - 19:00:22: [SM]   [1]  Line 306, thc_rpg/core.inc::Core_RoundEnd()
L 04/12/2011 - 19:00:22: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 19:00:22: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:00:22: [SM]   [0]  Line 387, thc_rpg/sql.inc::SavePlayerData()
L 04/12/2011 - 19:00:22: [SM]   [1]  Line 286, thc_rpg/core.inc::Core_OnClientDisconnect()
L 04/12/2011 - 19:00:28: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 19:00:28: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:00:28: [SM]   [0]  Line 291, thc_rpg/sql.inc::LoadPlayerData()
L 04/12/2011 - 19:00:28: [SM]   [1]  Line 276, thc_rpg/core.inc::Core_OnClientAuthorized()
L 04/12/2011 - 19:00:28: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 19:00:28: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:00:28: [SM]   [0]  Line 387, thc_rpg/sql.inc::SavePlayerData()
L 04/12/2011 - 19:00:28: [SM]   [1]  Line 306, thc_rpg/core.inc::Core_RoundEnd()
L 04/12/2011 - 19:00:28: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 19:00:28: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:00:28: [SM]   [0]  Line 291, thc_rpg/sql.inc::LoadPlayerData()
L 04/12/2011 - 19:00:28: [SM]   [1]  Line 276, thc_rpg/core.inc::Core_OnClientAuthorized()
L 04/12/2011 - 19:00:28: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 19:00:28: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:00:28: [SM]   [0]  Line 291, thc_rpg/sql.inc::LoadPlayerData()
L 04/12/2011 - 19:00:28: [SM]   [1]  Line 276, thc_rpg/core.inc::Core_OnClientAuthorized()
L 04/12/2011 - 19:00:28: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 19:00:28: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:00:28: [SM]   [0]  Line 291, thc_rpg/sql.inc::LoadPlayerData()
L 04/12/2011 - 19:00:28: [SM]   [1]  Line 276, thc_rpg/core.inc::Core_OnClientAuthorized()
L 04/12/2011 - 19:00:28: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 19:00:28: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:00:28: [SM]   [0]  Line 291, thc_rpg/sql.inc::LoadPlayerData()
L 04/12/2011 - 19:00:28: [SM]   [1]  Line 276, thc_rpg/core.inc::Core_OnClientAuthorized()
L 04/12/2011 - 19:00:28: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 19:00:28: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:00:28: [SM]   [0]  Line 291, thc_rpg/sql.inc::LoadPlayerData()
L 04/12/2011 - 19:00:28: [SM]   [1]  Line 276, thc_rpg/core.inc::Core_OnClientAuthorized()
L 04/12/2011 - 19:00:47: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 19:00:47: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:00:47: [SM]   [0]  Line 387, thc_rpg/sql.inc::SavePlayerData()
L 04/12/2011 - 19:00:47: [SM]   [1]  Line 286, thc_rpg/core.inc::Core_OnClientDisconnect()
L 04/12/2011 - 19:00:47: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 19:00:47: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:00:47: [SM]   [0]  Line 387, thc_rpg/sql.inc::SavePlayerData()
L 04/12/2011 - 19:00:47: [SM]   [1]  Line 286, thc_rpg/core.inc::Core_OnClientDisconnect()
L 04/12/2011 - 19:00:47: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 19:00:47: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:00:47: [SM]   [0]  Line 387, thc_rpg/sql.inc::SavePlayerData()
L 04/12/2011 - 19:00:47: [SM]   [1]  Line 286, thc_rpg/core.inc::Core_OnClientDisconnect()
L 04/12/2011 - 19:00:47: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 19:00:47: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:00:47: [SM]   [0]  Line 387, thc_rpg/sql.inc::SavePlayerData()
L 04/12/2011 - 19:00:47: [SM]   [1]  Line 286, thc_rpg/core.inc::Core_OnClientDisconnect()
L 04/12/2011 - 19:00:47: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 19:00:47: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:00:47: [SM]   [0]  Line 387, thc_rpg/sql.inc::SavePlayerData()
L 04/12/2011 - 19:00:47: [SM]   [1]  Line 286, thc_rpg/core.inc::Core_OnClientDisconnect()
L 04/12/2011 - 19:00:47: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 19:00:47: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:00:47: [SM]   [0]  Line 387, thc_rpg/sql.inc::SavePlayerData()
L 04/12/2011 - 19:00:47: [SM]   [1]  Line 286, thc_rpg/core.inc::Core_OnClientDisconnect()
L 04/12/2011 - 19:00:47: [SM] Native "GetClientTeam" reported: Client 1 is not in game
L 04/12/2011 - 19:00:47: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:00:47: [SM]   [0]  Line 307, thc_rpg/core.inc::Core_RoundEnd()
L 04/12/2011 - 19:00:47: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 19:00:47: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:00:47: [SM]   [0]  Line 387, thc_rpg/sql.inc::SavePlayerData()
L 04/12/2011 - 19:00:47: [SM]   [1]  Line 286, thc_rpg/core.inc::Core_OnClientDisconnect()
L 04/12/2011 - 19:00:59: SourceMod error session started
L 04/12/2011 - 19:00:59: Info (map "") (file "errors_20110412.log")
L 04/12/2011 - 19:00:59: Failed lookup of gEntList directly - Reverting to lookup via LevelShutdown
L 04/12/2011 - 19:01:03: Error log file session closed.
L 04/12/2011 - 19:01:04: SourceMod error session started
L 04/12/2011 - 19:01:04: Info (map "ze_predator_ultimate_v1_3") (file "errors_20110412.log")
L 04/12/2011 - 19:01:04: [UPDATER] --- BEGIN ERRORS FROM AUTOMATIC UPDATER ---
L 04/12/2011 - 19:01:04: [UPDATER] Could not download "http://update.sourcemod.net/update/"
L 04/12/2011 - 19:01:04: [UPDATER] Error: The requested URL returned error: 404
L 04/12/2011 - 19:01:04: [UPDATER] --- END ERRORS FROM AUTOMATIC UPDATER ---
L 04/12/2011 - 19:01:04: [mapchooser.smx] Unable to create a valid map list.
L 04/12/2011 - 19:01:04: [SM] Native "SQL_Query" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 19:01:04: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:01:04: [SM]   [0]  Line 514, thc_rpg/sql.inc::CheckDBUpdate()
L 04/12/2011 - 19:01:04: [SM]   [1]  Line 264, thc_rpg/core.inc::Core_OnConfigsExecuted()
L 04/12/2011 - 19:01:19: Error log file session closed.
L 04/12/2011 - 19:01:20: SourceMod error session started
L 04/12/2011 - 19:01:20: Info (map "ze_lab101_v2") (file "errors_20110412.log")
L 04/12/2011 - 19:01:20: [mapchooser.smx] Unable to create a valid map list.
L 04/12/2011 - 19:01:20: [SM] Native "SQL_Query" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 19:01:20: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:01:20: [SM]   [0]  Line 514, thc_rpg/sql.inc::CheckDBUpdate()
L 04/12/2011 - 19:01:20: [SM]   [1]  Line 264, thc_rpg/core.inc::Core_OnConfigsExecuted()
L 04/12/2011 - 19:01:29: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 19:01:29: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:01:29: [SM]   [0]  Line 291, thc_rpg/sql.inc::LoadPlayerData()
L 04/12/2011 - 19:01:29: [SM]   [1]  Line 276, thc_rpg/core.inc::Core_OnClientAuthorized()
L 04/12/2011 - 19:01:45: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 19:01:45: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:01:45: [SM]   [0]  Line 387, thc_rpg/sql.inc::SavePlayerData()
L 04/12/2011 - 19:01:45: [SM]   [1]  Line 286, thc_rpg/core.inc::Core_OnClientDisconnect()
L 04/12/2011 - 19:01:45: [SM] Native "GetClientTeam" reported: Client 1 is not in game
L 04/12/2011 - 19:01:45: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:01:45: [SM]   [0]  Line 307, thc_rpg/core.inc::Core_RoundEnd()
L 04/12/2011 - 19:01:48: [SM] Native "IsFakeClient" reported: Client 1 is not connected
L 04/12/2011 - 19:01:48: [SM] Displaying call stack trace for plugin "chat.smx":
L 04/12/2011 - 19:01:48: [SM]   [0]  Line 30, \\server\Server\Server\tf2server\server\orangebox\cstrike\addons\sourcemod\scripting\chat.sp::Advert()


EDIT 2:
FIXED IT COMPLETELY! well still a few logs here it is:
Code:
L 04/12/2011 - 19:31:14: SourceMod error session started
L 04/12/2011 - 19:31:14: Info (map "") (file "errors_20110412.log")
L 04/12/2011 - 19:31:14: Failed lookup of gEntList directly - Reverting to lookup via LevelShutdown
L 04/12/2011 - 19:31:17: Error log file session closed.
L 04/12/2011 - 19:31:20: SourceMod error session started
L 04/12/2011 - 19:31:20: Info (map "ze_predator_ultimate_v1_3") (file "errors_20110412.log")
L 04/12/2011 - 19:31:20: [UPDATER] --- BEGIN ERRORS FROM AUTOMATIC UPDATER ---
L 04/12/2011 - 19:31:20: [UPDATER] Could not download "http://update.sourcemod.net/update/"
L 04/12/2011 - 19:31:20: [UPDATER] Error: The requested URL returned error: 404
L 04/12/2011 - 19:31:20: [UPDATER] --- END ERRORS FROM AUTOMATIC UPDATER ---
L 04/12/2011 - 19:31:20: [mapchooser.smx] Unable to create a valid map list.
L 04/12/2011 - 19:31:20: [SM] Native "SQL_Query" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 19:31:20: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:31:20: [SM]   [0]  Line 174, thc_rpg/sql.inc::CreateSQLTable()
L 04/12/2011 - 19:31:20: [SM]   [1]  Line 263, thc_rpg/core.inc::Core_OnConfigsExecuted()
L 04/12/2011 - 19:31:51: [SM] Native "GetClientName" reported: Client 1 is not connected
L 04/12/2011 - 19:31:51: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:31:51: [SM]   [0]  Line 466, thc_rpg/sql.inc::SavePlayerDataCallback()
L 04/12/2011 - 19:31:57: Error log file session closed.
L 04/12/2011 - 19:31:58: SourceMod error session started
L 04/12/2011 - 19:31:58: Info (map "ze_lab101_v2") (file "errors_20110412.log")
L 04/12/2011 - 19:31:58: [mapchooser.smx] Unable to create a valid map list.
L 04/12/2011 - 19:32:07: [SM] Native "GetClientTeam" reported: Client 1 is not in game
L 04/12/2011 - 19:32:07: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:32:07: [SM]   [0]  Line 307, thc_rpg/core.inc::Core_RoundEnd()
L 04/12/2011 - 19:32:07: [SM] Native "GetClientName" reported: Client 1 is not connected
L 04/12/2011 - 19:32:07: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:32:07: [SM]   [0]  Line 466, thc_rpg/sql.inc::SavePlayerDataCallback()
L 04/12/2011 - 19:32:09: [SM] Native "GetClientName" reported: Client 1 is not connected
L 04/12/2011 - 19:32:09: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:32:09: [SM]   [0]  Line 370, thc_rpg/sql.inc::LoadPlayerDataCallback()
L 04/12/2011 - 19:32:09: [SM] Native "GetClientName" reported: Client 1 is not connected
L 04/12/2011 - 19:32:09: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:32:09: [SM]   [0]  Line 466, thc_rpg/sql.inc::SavePlayerDataCallback()
L 04/12/2011 - 19:32:10: [SM] Native "GetClientName" reported: Client 1 is not connected
L 04/12/2011 - 19:32:10: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:32:10: [SM]   [0]  Line 370, thc_rpg/sql.inc::LoadPlayerDataCallback()
L 04/12/2011 - 19:32:10: [SM] Native "GetClientName" reported: Client 1 is not connected
L 04/12/2011 - 19:32:10: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:32:10: [SM]   [0]  Line 466, thc_rpg/sql.inc::SavePlayerDataCallback()
L 04/12/2011 - 19:32:10: [SM] Native "GetClientName" reported: Client 1 is not connected
L 04/12/2011 - 19:32:10: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:32:10: [SM]   [0]  Line 370, thc_rpg/sql.inc::LoadPlayerDataCallback()
L 04/12/2011 - 19:32:10: [SM] Native "GetClientName" reported: Client 1 is not connected
L 04/12/2011 - 19:32:10: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:32:10: [SM]   [0]  Line 466, thc_rpg/sql.inc::SavePlayerDataCallback()
L 04/12/2011 - 19:32:11: [SM] Native "GetClientName" reported: Client 1 is not connected
L 04/12/2011 - 19:32:11: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:32:11: [SM]   [0]  Line 370, thc_rpg/sql.inc::LoadPlayerDataCallback()
L 04/12/2011 - 19:32:11: [SM] Native "GetClientName" reported: Client 1 is not connected
L 04/12/2011 - 19:32:11: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:32:11: [SM]   [0]  Line 370, thc_rpg/sql.inc::LoadPlayerDataCallback()
L 04/12/2011 - 19:32:11: [SM] Native "GetClientName" reported: Client 1 is not connected
L 04/12/2011 - 19:32:11: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:32:11: [SM]   [0]  Line 466, thc_rpg/sql.inc::SavePlayerDataCallback()
L 04/12/2011 - 19:32:11: [SM] Native "GetClientName" reported: Client 1 is not connected
L 04/12/2011 - 19:32:11: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:32:11: [SM]   [0]  Line 370, thc_rpg/sql.inc::LoadPlayerDataCallback()
L 04/12/2011 - 19:32:11: [SM] Native "GetClientName" reported: Client 1 is not connected
L 04/12/2011 - 19:32:11: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:32:11: [SM]   [0]  Line 370, thc_rpg/sql.inc::LoadPlayerDataCallback()
L 04/12/2011 - 19:32:11: [SM] Native "GetClientName" reported: Client 1 is not connected
L 04/12/2011 - 19:32:11: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:32:11: [SM]   [0]  Line 466, thc_rpg/sql.inc::SavePlayerDataCallback()
L 04/12/2011 - 19:32:17: [SM] Native "IsFakeClient" reported: Client 1 is not connected
L 04/12/2011 - 19:32:17: [SM] Displaying call stack trace for plugin "chat.smx":
L 04/12/2011 - 19:32:17: [SM]   [0]  Line 30, \\server\Server\Server\tf2server\server\orangebox\cstrike\addons\sourcemod\scripting\chat.sp::Advert()
L 04/12/2011 - 19:32:17: [SM] Native "IsFakeClient" reported: Client 1 is not connected
L 04/12/2011 - 19:32:17: [SM] Displaying call stack trace for plugin "chat.smx":
L 04/12/2011 - 19:32:17: [SM]   [0]  Line 30, \\server\Server\Server\tf2server\server\orangebox\cstrike\addons\sourcemod\scripting\chat.sp::Advert()
L 04/12/2011 - 19:32:19: [SM] Native "IsFakeClient" reported: Client 1 is not connected
L 04/12/2011 - 19:32:19: [SM] Displaying call stack trace for plugin "chat.smx":
L 04/12/2011 - 19:32:19: [SM]   [0]  Line 30, \\server\Server\Server\tf2server\server\orangebox\cstrike\addons\sourcemod\scripting\chat.sp::Advert()
L 04/12/2011 - 19:32:20: [SM] Native "IsFakeClient" reported: Client 1 is not connected
L 04/12/2011 - 19:32:20: [SM] Displaying call stack trace for plugin "chat.smx":
L 04/12/2011 - 19:32:20: [SM]   [0]  Line 30, \\server\Server\Server\tf2server\server\orangebox\cstrike\addons\sourcemod\scripting\chat.sp::Advert()
L 04/12/2011 - 19:32:20: [SM] Native "IsFakeClient" reported: Client 1 is not connected
L 04/12/2011 - 19:32:20: [SM] Displaying call stack trace for plugin "chat.smx":
L 04/12/2011 - 19:32:20: [SM]   [0]  Line 30, \\server\Server\Server\tf2server\server\orangebox\cstrike\addons\sourcemod\scripting\chat.sp::Advert()
L 04/12/2011 - 19:32:20: [SM] Plugin encountered error 25: Call was aborted
L 04/12/2011 - 19:32:20: [SM] Native "ThrowError" reported: Client 1 is not in game
L 04/12/2011 - 19:32:20: [SM] Displaying call stack trace for plugin "chat.smx":
L 04/12/2011 - 19:32:20: [SM]   [0]  Line 59, \\server\Server\Server\tf2server\server\orangebox\cstrike\addons\sourcemod\scripting\include\colors.inc::CPrintToChat()
L 04/12/2011 - 19:32:20: [SM]   [1]  Line 32, \\server\Server\Server\tf2server\server\orangebox\cstrike\addons\sourcemod\scripting\chat.sp::Advert()
L 04/12/2011 - 19:32:21: [SM] Plugin encountered error 25: Call was aborted
L 04/12/2011 - 19:32:21: [SM] Native "ThrowError" reported: Client 1 is not in game
L 04/12/2011 - 19:32:21: [SM] Displaying call stack trace for plugin "chat.smx":
L 04/12/2011 - 19:32:21: [SM]   [0]  Line 59, \\server\Server\Server\tf2server\server\orangebox\cstrike\addons\sourcemod\scripting\include\colors.inc::CPrintToChat()
L 04/12/2011 - 19:32:21: [SM]   [1]  Line 32, \\server\Server\Server\tf2server\server\orangebox\cstrike\addons\sourcemod\scripting\chat.sp::Advert()
L 04/12/2011 - 19:32:21: [SM] Plugin encountered error 25: Call was aborted
L 04/12/2011 - 19:32:21: [SM] Native "ThrowError" reported: Client 1 is not in game
L 04/12/2011 - 19:32:21: [SM] Displaying call stack trace for plugin "chat.smx":
L 04/12/2011 - 19:32:21: [SM]   [0]  Line 59, \\server\Server\Server\tf2server\server\orangebox\cstrike\addons\sourcemod\scripting\include\colors.inc::CPrintToChat()
L 04/12/2011 - 19:32:21: [SM]   [1]  Line 32, \\server\Server\Server\tf2server\server\orangebox\cstrike\addons\sourcemod\scripting\chat.sp::Advert()
L 04/12/2011 - 19:32:21: [SM] Plugin encountered error 25: Call was aborted
L 04/12/2011 - 19:32:21: [SM] Native "ThrowError" reported: Client 1 is not in game
L 04/12/2011 - 19:32:21: [SM] Displaying call stack trace for plugin "chat.smx":
L 04/12/2011 - 19:32:21: [SM]   [0]  Line 59, \\server\Server\Server\tf2server\server\orangebox\cstrike\addons\sourcemod\scripting\include\colors.inc::CPrintToChat()
L 04/12/2011 - 19:32:21: [SM]   [1]  Line 32, \\server\Server\Server\tf2server\server\orangebox\cstrike\addons\sourcemod\scripting\chat.sp::Advert()
L 04/12/2011 - 19:32:32: [SM] Native "GetClientTeam" reported: Client 3 is not in game
L 04/12/2011 - 19:32:32: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:32:32: [SM]   [0]  Line 307, thc_rpg/core.inc::Core_RoundEnd()
L 04/12/2011 - 19:33:26: [SM] Native "GetClientTeam" reported: Client 10 is not in game
L 04/12/2011 - 19:33:26: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:33:26: [SM]   [0]  Line 307, thc_rpg/core.inc::Core_RoundEnd()
L 04/12/2011 - 19:33:54: [SM] Native "GetClientName" reported: Client 1 is not connected
L 04/12/2011 - 19:33:54: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:33:54: [SM]   [0]  Line 466, thc_rpg/sql.inc::SavePlayerDataCallback()
L 04/12/2011 - 19:33:54: [SM] Native "GetClientName" reported: Client 3 is not connected
L 04/12/2011 - 19:33:54: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:33:54: [SM]   [0]  Line 466, thc_rpg/sql.inc::SavePlayerDataCallback()
L 04/12/2011 - 19:33:54: [SM] Native "GetClientTeam" reported: Client 1 is not in game
L 04/12/2011 - 19:33:54: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:33:54: [SM]   [0]  Line 307, thc_rpg/core.inc::Core_RoundEnd()
L 04/12/2011 - 19:33:54: [SM] Native "GetClientName" reported: Client 4 is not connected
L 04/12/2011 - 19:33:54: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:33:54: [SM]   [0]  Line 466, thc_rpg/sql.inc::SavePlayerDataCallback()
L 04/12/2011 - 19:33:54: [SM] Native "GetClientName" reported: Client 5 is not connected
L 04/12/2011 - 19:33:54: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:33:54: [SM]   [0]  Line 466, thc_rpg/sql.inc::SavePlayerDataCallback()
L 04/12/2011 - 19:33:54: [SM] Native "GetClientName" reported: Client 6 is not connected
L 04/12/2011 - 19:33:54: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:33:54: [SM]   [0]  Line 466, thc_rpg/sql.inc::SavePlayerDataCallback()
L 04/12/2011 - 19:33:54: [SM] Native "GetClientName" reported: Client 7 is not connected
L 04/12/2011 - 19:33:54: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:33:54: [SM]   [0]  Line 466, thc_rpg/sql.inc::SavePlayerDataCallback()
L 04/12/2011 - 19:33:54: [SM] Native "GetClientName" reported: Client 8 is not connected
L 04/12/2011 - 19:33:54: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:33:54: [SM]   [0]  Line 466, thc_rpg/sql.inc::SavePlayerDataCallback()
L 04/12/2011 - 19:33:54: [SM] Native "GetClientName" reported: Client 2 is not connected
L 04/12/2011 - 19:33:54: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:33:54: [SM]   [0]  Line 466, thc_rpg/sql.inc::SavePlayerDataCallback()
L 04/12/2011 - 19:33:54: [SM] Native "GetClientName" reported: Client 9 is not connected
L 04/12/2011 - 19:33:54: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:33:54: [SM]   [0]  Line 466, thc_rpg/sql.inc::SavePlayerDataCallback()
L 04/12/2011 - 19:34:14: [SM] Native "GetClientTeam" reported: Client 3 is not in game
L 04/12/2011 - 19:34:14: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:34:14: [SM]   [0]  Line 307, thc_rpg/core.inc::Core_RoundEnd()
L 04/12/2011 - 19:35:54: [SM] Native "GetClientTeam" reported: Client 10 is not in game
L 04/12/2011 - 19:35:54: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:35:54: [SM]   [0]  Line 307, thc_rpg/core.inc::Core_RoundEnd()
L 04/12/2011 - 19:35:58: [SM] Native "GetClientName" reported: Client 1 is not connected
L 04/12/2011 - 19:35:58: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:35:58: [SM]   [0]  Line 466, thc_rpg/sql.inc::SavePlayerDataCallback()
L 04/12/2011 - 19:35:58: [SM] Native "GetClientName" reported: Client 3 is not connected
L 04/12/2011 - 19:35:58: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:35:58: [SM]   [0]  Line 466, thc_rpg/sql.inc::SavePlayerDataCallback()
L 04/12/2011 - 19:35:58: [SM] Native "GetClientName" reported: Client 2 is not connected
L 04/12/2011 - 19:35:58: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:35:58: [SM]   [0]  Line 466, thc_rpg/sql.inc::SavePlayerDataCallback()
L 04/12/2011 - 19:35:58: [SM] Native "GetClientName" reported: Client 5 is not connected
L 04/12/2011 - 19:35:58: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:35:58: [SM]   [0]  Line 466, thc_rpg/sql.inc::SavePlayerDataCallback()
L 04/12/2011 - 19:35:58: [SM] Native "GetClientName" reported: Client 4 is not connected
L 04/12/2011 - 19:35:58: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:35:58: [SM]   [0]  Line 466, thc_rpg/sql.inc::SavePlayerDataCallback()
L 04/12/2011 - 19:35:58: [SM] Native "GetClientName" reported: Client 7 is not connected
L 04/12/2011 - 19:35:58: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:35:58: [SM]   [0]  Line 466, thc_rpg/sql.inc::SavePlayerDataCallback()
L 04/12/2011 - 19:35:58: [SM] Native "GetClientName" reported: Client 6 is not connected
L 04/12/2011 - 19:35:58: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:35:58: [SM]   [0]  Line 466, thc_rpg/sql.inc::SavePlayerDataCallback()
L 04/12/2011 - 19:35:58: [SM] Native "GetClientName" reported: Client 9 is not connected
L 04/12/2011 - 19:35:58: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:35:58: [SM]   [0]  Line 466, thc_rpg/sql.inc::SavePlayerDataCallback()
L 04/12/2011 - 19:35:58: [SM] Native "GetClientName" reported: Client 8 is not connected
L 04/12/2011 - 19:35:58: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:35:58: [SM]   [0]  Line 466, thc_rpg/sql.inc::SavePlayerDataCallback()
L 04/12/2011 - 19:36:15: SourceMod error session started
L 04/12/2011 - 19:36:15: Info (map "") (file "errors_20110412.log")
L 04/12/2011 - 19:36:15: Failed lookup of gEntList directly - Reverting to lookup via LevelShutdown
L 04/12/2011 - 19:36:18: Error log file session closed.
L 04/12/2011 - 19:36:21: SourceMod error session started
L 04/12/2011 - 19:36:21: Info (map "ze_predator_ultimate_v1_3") (file "errors_20110412.log")
L 04/12/2011 - 19:36:21: [UPDATER] --- BEGIN ERRORS FROM AUTOMATIC UPDATER ---
L 04/12/2011 - 19:36:21: [UPDATER] Could not download "http://update.sourcemod.net/update/"
L 04/12/2011 - 19:36:21: [UPDATER] Error: The requested URL returned error: 404
L 04/12/2011 - 19:36:21: [UPDATER] --- END ERRORS FROM AUTOMATIC UPDATER ---
L 04/12/2011 - 19:36:21: [mapchooser.smx] Unable to create a valid map list.
L 04/12/2011 - 19:36:21: [SM] Native "SQL_Query" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 19:36:21: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:36:21: [SM]   [0]  Line 174, thc_rpg/sql.inc::CreateSQLTable()
L 04/12/2011 - 19:36:21: [SM]   [1]  Line 263, thc_rpg/core.inc::Core_OnConfigsExecuted()
L 04/12/2011 - 19:36:54: [SM] Native "GetClientTeam" reported: Client 1 is not in game
L 04/12/2011 - 19:36:54: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:36:54: [SM]   [0]  Line 307, thc_rpg/core.inc::Core_RoundEnd()
L 04/12/2011 - 19:36:54: [SM] Native "GetClientName" reported: Client 1 is not connected
L 04/12/2011 - 19:36:54: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:36:54: [SM]   [0]  Line 466, thc_rpg/sql.inc::SavePlayerDataCallback()
L 04/12/2011 - 19:37:01: SourceMod error session started
L 04/12/2011 - 19:37:01: Info (map "") (file "errors_20110412.log")
L 04/12/2011 - 19:37:01: Failed lookup of gEntList directly - Reverting to lookup via LevelShutdown
L 04/12/2011 - 19:37:04: Error log file session closed.
L 04/12/2011 - 19:37:07: SourceMod error session started
L 04/12/2011 - 19:37:07: Info (map "ze_predator_ultimate_v1_3") (file "errors_20110412.log")
L 04/12/2011 - 19:37:07: [UPDATER] --- BEGIN ERRORS FROM AUTOMATIC UPDATER ---
L 04/12/2011 - 19:37:07: [UPDATER] Could not download "http://update.sourcemod.net/update/"
L 04/12/2011 - 19:37:07: [UPDATER] Error: The requested URL returned error: 404
L 04/12/2011 - 19:37:07: [UPDATER] --- END ERRORS FROM AUTOMATIC UPDATER ---
L 04/12/2011 - 19:37:07: [mapchooser.smx] Unable to create a valid map list.
L 04/12/2011 - 19:37:07: [SM] Native "SQL_Query" reported: Invalid database Handle 0 (error: 4)
L 04/12/2011 - 19:37:07: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:37:07: [SM]   [0]  Line 174, thc_rpg/sql.inc::CreateSQLTable()
L 04/12/2011 - 19:37:07: [SM]   [1]  Line 263, thc_rpg/core.inc::Core_OnConfigsExecuted()
L 04/12/2011 - 19:37:34: [SM] Native "GetClientTeam" reported: Client 1 is not in game
L 04/12/2011 - 19:37:34: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:37:34: [SM]   [0]  Line 307, thc_rpg/core.inc::Core_RoundEnd()
L 04/12/2011 - 19:37:34: [SM] Native "GetClientName" reported: Client 1 is not connected
L 04/12/2011 - 19:37:34: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:37:34: [SM]   [0]  Line 466, thc_rpg/sql.inc::SavePlayerDataCallback()
L 04/12/2011 - 19:37:35: [SM] Native "IsFakeClient" reported: Client 1 is not connected
L 04/12/2011 - 19:37:35: [SM] Displaying call stack trace for plugin "chat.smx":
L 04/12/2011 - 19:37:35: [SM]   [0]  Line 30, \\server\Server\Server\tf2server\server\orangebox\cstrike\addons\sourcemod\scripting\chat.sp::Advert()
L 04/12/2011 - 19:38:18: [SM] Native "GetClientTeam" reported: Client 1 is not in game
L 04/12/2011 - 19:38:18: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:38:18: [SM]   [0]  Line 307, thc_rpg/core.inc::Core_RoundEnd()
L 04/12/2011 - 19:38:18: [SM] Native "GetClientName" reported: Client 1 is not connected
L 04/12/2011 - 19:38:18: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/12/2011 - 19:38:18: [SM]   [0]  Line 466, thc_rpg/sql.inc::SavePlayerDataCallback()
L 04/12/2011 - 19:38:21: [SM] Native "IsFakeClient" reported: Client 1 is not connected
L 04/12/2011 - 19:38:21: [SM] Displaying call stack trace for plugin "chat.smx":
L 04/12/2011 - 19:38:21: [SM]   [0]  Line 30, \\server\Server\Server\tf2server\server\orangebox\cstrike\addons\sourcemod\scripting\chat.sp::Advert()
but i fixed the player data thing, if u want the code please pm me and i will give it to u tomarrow
thanks.
gamemann
__________________
Software/network engineer. I often work on a neat project called The Modding Community.

Check out my GitHub here!

Last edited by gamemann; 04-12-2011 at 22:38.
gamemann is offline
Send a message via Skype™ to gamemann
arsirc
Veteran Member
Join Date: Dec 2007
Location: Carinthia,Austria,Earth
Old 04-13-2011 , 02:09   Re: [THC RPG] Total HardCore RPG
Reply With Quote #508

you have to overwrite some other files too!
please try to use the complete new code and report back!

thx
arsirc is offline
gamemann
Veteran Member
Join Date: Sep 2009
Location: Mullica Hill, New Jersey
Old 04-13-2011 , 15:14   Re: [THC RPG] Total HardCore RPG
Reply With Quote #509

Quote:
Originally Posted by arsirc View Post
you have to overwrite some other files too!
please try to use the complete new code and report back!

thx
thx but when i compiled it, it still said "unknown symbol createsqltable();" and "unkown symbol dropsql();" something like that.... So i went into the old sql.inc and took those undefined symbols and added them to new sql and heres the error log:
Code:
L 04/13/2011 - 12:12:16: SourceMod error session started
L 04/13/2011 - 12:12:16: Info (map "") (file "errors_20110413.log")
L 04/13/2011 - 12:12:16: Failed lookup of gEntList directly - Reverting to lookup via LevelShutdown
L 04/13/2011 - 12:12:30: Error log file session closed.
L 04/13/2011 - 12:12:38: SourceMod error session started
L 04/13/2011 - 12:12:38: Info (map "ze_predator_ultimate_v1_3") (file "errors_20110413.log")
L 04/13/2011 - 12:12:38: [UPDATER] --- BEGIN ERRORS FROM AUTOMATIC UPDATER ---
L 04/13/2011 - 12:12:38: [UPDATER] Could not download "http://update.sourcemod.net/update/"
L 04/13/2011 - 12:12:38: [UPDATER] Error: The requested URL returned error: 404
L 04/13/2011 - 12:12:38: [UPDATER] --- END ERRORS FROM AUTOMATIC UPDATER ---
L 04/13/2011 - 12:12:38: [mapchooser.smx] Unable to create a valid map list.
L 04/13/2011 - 12:12:39: [SM] Native "SQL_Query" reported: Invalid database Handle 0 (error: 4)
L 04/13/2011 - 12:12:39: [SM] Displaying call stack trace for plugin "thc_rpg.smx":
L 04/13/2011 - 12:12:39: [SM]   [0]  Line 150, thc_rpg/sql.inc::CreateSQLTable()
L 04/13/2011 - 12:12:39: [SM]   [1]  Line 263, thc_rpg/core.inc::Core_OnConfigsExecuted()
and heres my new sql.inc:
Code:
/*
 * ============================================================================
 *
 *  [THC RPG] Total HardCore RPG
 *
 *  File:          sql.inc
 *  Type:          Core
 *  Description:   contains SQL specific functions
 *
 *  Copyright (C) 2009-2011  ArsiRC
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * ============================================================================
 */

#pragma semicolon 1

new reconnectcounter = 0;

ConnectSQL()
{
    if (hSQL != INVALID_HANDLE)
        CloseHandle(hSQL);
    hSQL = INVALID_HANDLE;

    if (SQL_CheckConfig("thc_rpg"))
        SQL_TConnect(ConnectSQLCallback, "thc_rpg");
    else
        LogMgr_Print(g_moduleCore, LogType_Fatal_Plugin, "ConnectSQL", "No config entry found for 'thc_rpg' in databases.cfg");
}

public ConnectSQLCallback(Handle:owner, Handle:hndl, const String:error[], any:data)
{
    if (reconnectcounter >= 5)
    {
        LogMgr_Print(g_moduleCore, LogType_Fatal_Plugin, "ConnectSQL", "PLUGIN STOPPED - reconnect counter reached max - PLUGIN STOPPED");
        return -1;
    }

    if (hndl == INVALID_HANDLE)
    {
        LogMgr_Print(g_moduleCore, LogType_Error, "ConnectSQL", "Connection to SQL database has failed, Reason: %s", error);
        reconnectcounter++;
        ConnectSQL();
        return -1;
    }

    LogMgr_Print(g_moduleCore, LogType_Debug, "ConnectSQL", "Successfully connected to database");

    new String:driver[16];
    SQL_GetDriverIdent(owner,driver,sizeof(driver));
    if (StrEqual(driver,"mysql",false))
        SQL_FastQuery(hndl,"SET NAMES  'utf8'");

    // save database handle
    hSQL = CloneHandle(hndl);

    reconnectcounter = 0;
    return 1;
}

ManageSQLTable(mode)
{
    // Check if the table exists
    SQL_TQuery(hSQL, ManageSQLTableCallback, "SHOW TABLES", mode, DBPrio_High);
}

public ManageSQLTableCallback(Handle:owner, Handle:hndl, const String:error[], any:mode)
{
    if (owner == INVALID_HANDLE)
    {
        LogMgr_Print(g_moduleCore, LogType_Error, "ManageSQLTable", "Connection to SQL database has failed, Reason: %s", error);
        reconnectcounter++;
        ConnectSQL();
        return -1;
    }

    if (hndl == INVALID_HANDLE)
        LogMgr_Print(g_moduleCore, LogType_Fatal_Plugin, "ManageSQLTable", "Error at requesting table, Reason: %s", error);
    else
    {
        if(mode==1)
            SQL_TQuery(hSQL,CreateSQLTableCallback,"CREATE TABLE thc_rpg (ID VARCHAR(64),name VARCHAR(128),xp INTEGER(8),reqxp INTEGER(8),level INTEGER(8),credits INTEGER(8),dbver VARCHAR(8))", DBPrio_High);

        if(mode==2)
        {
            while (SQL_FetchRow(hndl))
            {
                decl String:result[16];
                SQL_FetchString(hndl,0,result,sizeof(result));
                new exists=StrContains(result, "thc_rpg", false);
                if(exists!=-1)
                    SQL_TQuery(hSQL,DropSQLTableCallback,"DROP TABLE thc_rpg", DBPrio_High);
            }
        }
    }

    return 1;
}

public CreateSQLTableCallback(Handle:owner, Handle:hndl, const String:error[], any:data)
{
    if (owner == INVALID_HANDLE)
    {
        LogMgr_Print(g_moduleCore, LogType_Error, "CreateSQLTable", "Connection to SQL database has failed, Reason: %s", error);
        reconnectcounter++;
        ConnectSQL();
        return -1;
    }

    if (hndl == INVALID_HANDLE)
        LogMgr_Print(g_moduleCore, LogType_Fatal_Plugin, "CreateSQLTable", "Could not create the necessary table in database, Reason: %s", error);
    else
    {
        LogMgr_Print(g_moduleCore, LogType_Debug, "CreateSQLTable", "Successfully created necessary table in database");

        for(new moduleindex=1;moduleindex<MODULE_COUNT;moduleindex++)
        {
            decl String:shortname[16], String:sLevel[16], String:sCost[16];
            // Read moduleindex as a Module type.
            new Module:upgrade = Module:moduleindex;

            ModuleMgr_ReadString(upgrade, ModuleData_ShortName, shortname, sizeof(shortname));
            Format(sLevel,sizeof(sLevel),"%s_l",shortname);
            CreateColumn(owner,sLevel,"VARCHAR(16)");
            Format(sCost,sizeof(sCost),"%s_c",shortname);
            CreateColumn(owner,sCost,"VARCHAR(16)");
        }
    }

    return 1;
}

CreateSQLTable()
{
    // Check if the table exists
    new Handle:hDB=SQL_Query(hSQL,"SELECT * FROM thc_rpg");
    new bool:exists=true;
    if(hDB==INVALID_HANDLE)
        exists=false;
    else
        CloseHandle(hDB);
    if(!exists)
    {
        if(SQL_FastQuery(hSQL,"CREATE TABLE thc_rpg (ID VARCHAR(64),name VARCHAR(128),xp INTEGER(8),reqxp INTEGER(8),level INTEGER(8),credits INTEGER(8),dbver VARCHAR(8))"))
            LogMgr_Print(g_moduleCore, LogType_Debug, "CreateSQLTable", "Successfully created necessary table in database");
        else
        {
            decl String:errorbuffer[1024];
            new bool:error=SQL_GetError(hSQL, errorbuffer, sizeof(errorbuffer));
            if(error)
                LogMgr_Print(g_moduleCore, LogType_Fatal_Plugin, "CreateSQLTable", "Could not create the necessary table in database");
        }
    }
    for(new moduleindex=1;moduleindex<MODULE_COUNT;moduleindex++)
    {
        decl String:shortname[16], String:sLevel[16], String:sCost[16];
        // Read moduleindex as a Module type.
        new Module:upgrade = Module:moduleindex;

        ModuleMgr_ReadString(upgrade, ModuleData_ShortName, shortname, sizeof(shortname));
        Format(sLevel,sizeof(sLevel),"%s_l",shortname);
        CreateColumn(hSQL,sLevel,"VARCHAR(16)");
        Format(sCost,sizeof(sCost),"%s_c",shortname);
        CreateColumn(hSQL,sCost,"VARCHAR(16)");
    }
}

DropSQLTable()
{
    // Check if the table exists
    new Handle:hDB=SQL_Query(hSQL,"SELECT * FROM thc_rpg");
    new bool:exists=true;
    if(hDB==INVALID_HANDLE)
        exists=false;
    else
        CloseHandle(hDB);
    if(exists)
    {
        if(SQL_FastQuery(hSQL,"DROP TABLE thc_rpg"))
            LogMgr_Print(g_moduleCore, LogType_Debug, "DropSQLTable", "Successfully dropped table from database");
        else
        {
            decl String:errorbuffer[1024];
            new bool:error=SQL_GetError(hSQL, errorbuffer, sizeof(errorbuffer));
            if(error)
                LogMgr_Print(g_moduleCore, LogType_Fatal_Plugin, "DropSQLTable", "Could not drop tabel from database, Reason: %s", errorbuffer);
        }
    }
}

public DropSQLTableCallback(Handle:owner, Handle:hndl, const String:error[], any:data)
{
    if (owner == INVALID_HANDLE)
    {
        LogMgr_Print(g_moduleCore, LogType_Error, "DropSQLTable", "Connection to SQL database has failed, Reason: %s", error);
        reconnectcounter++;
        ConnectSQL();
        return -1;
    }

    if (hndl == INVALID_HANDLE)
        LogMgr_Print(g_moduleCore, LogType_Error, "DropSQLTable", "Could not drop tabel from database, Reason: %s", error);
    else
        LogMgr_Print(g_moduleCore, LogType_Debug, "DropSQLTable", "Successfully dropped table from database");

    return 1;
}

InsertPlayer(client)
{
    if(client)
    {
        decl String:uniqueid[64];
        new vecposi = GetPlayerVectorPosition(client);
        if(vecposi!=-1)
            GetArrayString(GetArrayCell(vecPlayers,vecposi), VECTOR_PLAYERS_ID, uniqueid, sizeof(uniqueid));
        else
            return -1;

        decl String:buffer[8192],String:clientname[128];
        GetClientName(client,clientname,sizeof(clientname));
        ReplaceString(clientname, sizeof(clientname), "'", "", false);

        Format(buffer,sizeof(buffer),"INSERT INTO thc_rpg (ID,name,xp,reqxp,level,credits,dbver");
        for(new moduleindex=1;moduleindex<MODULE_COUNT;moduleindex++)
        {
            decl String:shortname[16];
            // Read moduleindex as a Module type.
            new Module:upgrade = Module:moduleindex;

            ModuleMgr_ReadString(upgrade, ModuleData_ShortName, shortname, sizeof(shortname));
            Format(buffer,sizeof(buffer),"%s,%s_l,%s_c",buffer,shortname,shortname);
        }
        Format(buffer,sizeof(buffer),"%s) VALUES ('%s','%s','0','%d','1','%d','%s'",buffer,uniqueid,clientname,g_CoreConfigCache[CoreConfig_exp_start],g_CoreConfigCache[CoreConfig_credits_start],PROJECT_VERSION);
        SetStaticXP(client,0);
        SetStaticReqXP(client,g_CoreConfigCache[CoreConfig_exp_start]);
        SetStaticLevel(client,1);
        SetStaticCredits(client,g_CoreConfigCache[CoreConfig_credits_start]);
        for(new moduleindex=1;moduleindex<MODULE_COUNT;moduleindex++)
        {
            decl String:shortname[16];
            // Read moduleindex as a Module type.
            new Module:upgrade = Module:moduleindex;

            ModuleMgr_ReadString(upgrade, ModuleData_ShortName, shortname, sizeof(shortname));
            new cost = ModuleMgr_ReadCell(upgrade, ModuleData_Cost);

            Format(buffer,sizeof(buffer),"%s,'0','%d'",buffer,cost);
            SetPlayerUpgradeLevel(client,upgrade,0);
            SetPlayerUpgradeCost(client,upgrade,cost);
        }
        Format(buffer,sizeof(buffer),"%s)",buffer);
        if(strlen(buffer)>=sizeof(buffer))
            LogMgr_Print(g_moduleCore, LogType_Error, "InsertPlayer", "Player %s not added to database, Reason: string size limit exceeded", clientname);
        else
            SQL_TQuery(hSQL, InsertPlayerCallback, buffer, client, DBPrio_High);

        return 1;
    }
    else
        return -1;
}

public InsertPlayerCallback(Handle:owner, Handle:hndl, const String:error[], any:client)
{
    if (owner == INVALID_HANDLE)
    {
        LogMgr_Print(g_moduleCore, LogType_Error, "InsertPlayer", "Connection to SQL database has failed, Reason: %s", error);
        reconnectcounter++;
        ConnectSQL();
        return -1;
    }

    decl String:clientname[128];
    GetClientName(client,clientname,sizeof(clientname));
    ReplaceString(clientname, sizeof(clientname), "'", "", false);

    if (hndl == INVALID_HANDLE)
        LogMgr_Print(g_moduleCore, LogType_Error, "InsertPlayer", "Player %s not added to database, Reason: %s", clientname, error);
    else
        LogMgr_Print(g_moduleCore, LogType_Debug, "InsertPlayer", "Player %s added to database", clientname);

    return 1;
}


RemovePlayer(client)
{
    if(client)
    {
        new vecPosi = GetPlayerVectorPosition(client);
        if(vecPosi!=-1)
        {
            decl String:uniqueid[64],String:buffer[128];

            GetArrayString(GetArrayCell(vecPlayers,vecPosi), VECTOR_PLAYERS_ID, uniqueid, sizeof(uniqueid));
            Format(buffer,sizeof(buffer),"DELETE FROM thc_rpg WHERE ID=%s",uniqueid);
            SQL_TQuery(hSQL, RemovePlayerCallback, buffer, client, DBPrio_High);
            return 1;
        }
        else
            return -1;
    }
    else
        return -1;
}

public RemovePlayerCallback(Handle:owner, Handle:hndl, const String:error[], any:client)
{
    if (owner == INVALID_HANDLE)
    {
        LogMgr_Print(g_moduleCore, LogType_Error, "RemovePlayer", "Connection to SQL database has failed, Reason: %s", error);
        reconnectcounter++;
        ConnectSQL();
        return -1;
    }

    decl String:clientname[128];
    GetClientName(client,clientname,sizeof(clientname));
    ReplaceString(clientname, sizeof(clientname), "'", "", false);

    if (hndl == INVALID_HANDLE)
        LogMgr_Print(g_moduleCore, LogType_Error, "RemovePlayer", "Player %s not removed from database, Reason: %s", clientname, error);
    else
        LogMgr_Print(g_moduleCore, LogType_Debug, "RemovePlayer", "Player %s removed from database", clientname);

    return 1;
}

LoadPlayerData(client)
{
    if(client)
    {
        decl String:uniqueid[64];
        new vecPosi=GetPlayerVectorPosition(client);
        if(vecPosi!=-1)
            GetArrayString(GetArrayCell(vecPlayers,vecPosi), VECTOR_PLAYERS_ID, uniqueid, sizeof(uniqueid));
        else
            return -1;
        decl String:buffer[128];
        Format(buffer,sizeof(buffer),"SELECT * FROM thc_rpg WHERE ID = '%s'",uniqueid);
        SQL_TQuery(hSQL, LoadPlayerDataCallback, buffer, client, DBPrio_High);
        return 1;
    }
    else
        return -1;
}

public LoadPlayerDataCallback(Handle:owner, Handle:hndl, const String:error[], any:client)
{
    if (owner == INVALID_HANDLE)
    {
        LogMgr_Print(g_moduleCore, LogType_Error, "LoadPlayerData", "Connection to SQL database has failed, Reason: %s", error);
        reconnectcounter++;
        ConnectSQL();
        return -1;
    }

    decl String:clientname[128];
    GetClientName(client,clientname,sizeof(clientname));
    ReplaceString(clientname, sizeof(clientname), "'", "", false);

    if (hndl == INVALID_HANDLE)
    {
        LogMgr_Print(g_moduleCore, LogType_Error, "LoadPlayerData", "Cant load data of Player %s from database, Reason: %s", clientname, error);
    }
    else
    {
            SQL_Rewind(hndl);
            new bool:fetch=SQL_FetchRow(hndl);
            if(!fetch)
            {
                LogMgr_Print(g_moduleCore, LogType_Debug, "LoadPlayerData", "Player %s does not exists in database, needs to be inserted", clientname);
                InsertPlayer(client);
                return 0;
            }
            else
            {
                SetStaticXP(client,GetSQLDataInt(hndl,"xp"));
                SetStaticReqXP(client,GetSQLDataInt(hndl,"reqxp"));
                SetStaticLevel(client,GetSQLDataInt(hndl,"level"));
                SetStaticCredits(client,GetSQLDataInt(hndl,"credits"));
                for(new moduleindex=1;moduleindex<MODULE_COUNT;moduleindex++)
                {
                    decl String:shortname[16];
                    // Read moduleindex as a Module type.
                    new Module:upgrade = Module:moduleindex;

                    ModuleMgr_ReadString(upgrade, ModuleData_ShortName, shortname, sizeof(shortname));

                    decl String:buffer[128];
                    Format(buffer,sizeof(buffer),"%s_l",shortname);
                    new level=GetSQLDataInt(hndl,buffer);
                    if(level==-1)
                        level = 0;
                    SetPlayerUpgradeLevel(client,upgrade,level);

                    Format(buffer,sizeof(buffer),"%s_c",shortname);
                    new cost=GetSQLDataInt(hndl,buffer);
                    if(cost==-1)
                        cost = ModuleMgr_ReadCell(upgrade, ModuleData_Cost);
                    SetPlayerUpgradeCost(client,upgrade,cost);
                }
            }

    }

    return 1;
}

SavePlayerData(client)
{
    if(client)
    {
        decl String:uniqueid[64];
        new vecPosi=GetPlayerVectorPosition(client);
        if(vecPosi!=-1)
            GetArrayString(GetArrayCell(vecPlayers,vecPosi), VECTOR_PLAYERS_ID, uniqueid, sizeof(uniqueid));
        else
            return -1;

        decl String:clientname[128];
        GetClientName(client,clientname,sizeof(clientname));
        ReplaceString(clientname, sizeof(clientname), "'", "", false);

        decl String:buffer[2048];
        Format(buffer,sizeof(buffer),"name = '%s', xp = '%d', reqxp = '%d', level = '%d', credits = '%d'",clientname,GetXP(client),GetReqXP(client),GetLevel(client),GetCredits(client));
        for(new moduleindex=1;moduleindex<MODULE_COUNT;moduleindex++)
        {
            decl String:shortname[16];
            // Read moduleindex as a Module type.
            new Module:upgrade = Module:moduleindex;

            ModuleMgr_ReadString(upgrade, ModuleData_ShortName, shortname, sizeof(shortname));
            Format(buffer,sizeof(buffer),"%s, %s_l = '%d', %s_c = '%d'",buffer,shortname,GetPlayerUpgradeLevel(client,upgrade),shortname,GetPlayerUpgradeCost(client,upgrade));
        }
        decl String:query[2048];
        Format(query,sizeof(query),"UPDATE thc_rpg SET %s WHERE ID = '%s'",buffer,uniqueid);
        
        new Handle:datapack = CreateDataPack();
        WritePackString(datapack, clientname);
        
        SQL_TQuery(hSQL, SavePlayerDataCallback, query, datapack, DBPrio_High);
        return vecPosi;
    }
    else
        return -1;
}

public SavePlayerDataCallback(Handle:owner, Handle:hndl, const String:error[], any:datapack)
{
    if (owner == INVALID_HANDLE)
    {
        LogMgr_Print(g_moduleCore, LogType_Error, "SavePlayerData", "Connection to SQL database has failed, Reason: %s", error);
        reconnectcounter++;
        ConnectSQL();
        return -1;
    }

    decl String:clientname[128];
    ResetPack(datapack);
    ReadPackString(datapack, clientname, sizeof(clientname));
    
    if (hndl == INVALID_HANDLE)
        LogMgr_Print(g_moduleCore, LogType_Error, "SavePlayerData", "Player %s not saved to database, Reason: %s", clientname, error);
    else
        LogMgr_Print(g_moduleCore, LogType_Debug, "SavePlayerData", "Player %s saved to database", clientname);

    return 1;
}

//
//
//

GetSQLDataInt(Handle:query,const String:columnname[])
{
    new column;
    decl String:result[16];
    SQL_FieldNameToNum(query,columnname,column);
    SQL_FetchString(query,column,result,sizeof(result));
    if(SQL_IsFieldNull(query, column))
        return -1;
    else
        return StringToInt(result);
}

CreateColumn(Handle:sql,const String:columnname[],const String:settings[])
{
    decl String:query[256];

    Format(query,sizeof(query),"SELECT %s FROM thc_rpg",columnname);
    if(!SQL_FastQuery(hSQL,query))
    {
        Format(query,sizeof(query),"ALTER TABLE thc_rpg ADD COLUMN %s %s",columnname,settings);
        if(SQL_FastQuery(sql,query))
            LogMgr_Print(g_moduleCore, LogType_Debug, "CreateColumn", "Successfully created necessary column '%s' in database", columnname);
        else
        {
            decl String:errorbuffer[1024];
            new bool:error=SQL_GetError(hSQL, errorbuffer, sizeof(errorbuffer));
            if(error)
                LogMgr_Print(g_moduleCore, LogType_Fatal_Plugin, "CreateColumn", "Could not create column %s in database, Reason: %s", columnname, errorbuffer);
        }
    }
}

GetPlayerRank(client)
{
    if(client)
    {
        new rank,Handle:hResults;
        decl String:buffer[128];

        Format(buffer,sizeof(buffer),"SELECT COUNT(*) FROM thc_rpg WHERE level > %d",GetLevel(client));
        hResults=SQL_Query(hSQL,buffer);
        if(SQL_FetchRow(hResults))
            rank+=SQL_FetchInt(hResults,0);

        Format(buffer, sizeof(buffer), "SELECT COUNT(*) FROM thc_rpg WHERE level = %d AND xp > %d",GetLevel(client),GetXP(client));
        hResults=SQL_Query(hSQL,buffer);
        if(SQL_FetchRow(hResults))
            rank+=SQL_FetchInt(hResults,0);

        Format(buffer, sizeof(buffer), "SELECT COUNT(*) FROM thc_rpg WHERE level = %d AND xp = %d AND credits > %d",GetLevel(client),GetXP(client),GetCredits(client));
        hResults=SQL_Query(hSQL,buffer);
        if(SQL_FetchRow(hResults))
            rank+=SQL_FetchInt(hResults,0);

        CloseHandle(hResults);
        return rank+1;
    }
    else
        return -1;
}

GetPlayerTop10(String:Top10[][][],maxlen)
{
    new Handle:hResults,column1,column2,playercount;
    decl String:buffer[128];

    Format(buffer,sizeof(buffer),"SELECT COUNT(*) FROM thc_rpg ORDER BY level DESC, xp DESC, credits DESC LIMIT 10");
    hResults=SQL_Query(hSQL,buffer);
    if(SQL_FetchRow(hResults))
        playercount=SQL_FetchInt(hResults,0);
    if(playercount>10)
        playercount=10;

    Format(buffer,sizeof(buffer),"SELECT * FROM thc_rpg ORDER BY level DESC, xp DESC, credits DESC LIMIT 10");
    hResults=SQL_Query(hSQL,buffer);
    SQL_FieldNameToNum(hResults,"name",column1);
    SQL_FieldNameToNum(hResults,"level",column2);
    for(new i=0;i<playercount;i++)
    {
        if(SQL_FetchRow(hResults))
        {
            SQL_FetchString(hResults, column1, Top10[i][0], maxlen);
            new level = SQL_FetchInt(hResults, column2);
            IntToString(level, Top10[i][1], maxlen);
        }
    }

    CloseHandle(hResults);
    return playercount;
}

CheckDBUpdate()
{
    new bool:error;
    decl String:errorbuffer[1024],String:query[64];
    new Handle:hResult=SQL_Query(hSQL,"SELECT dbver FROM thc_rpg");
    if(hResult)
    {
        SQL_Rewind(hResult);
        new bool:fetch=SQL_FetchRow(hResult);
        if(!fetch)
        {
            CloseHandle(hResult);
            LogMgr_Print(g_moduleCore, LogType_Error, "CheckDBUpdate", "Database query error, no data fetched");
            return 0;
        }
        else
        {
            new column;
            decl String:result[16];
            SQL_FieldNameToNum(hResult,"dbver",column);
            SQL_FetchString(hResult,column,result,sizeof(result));
            if(!SQL_IsFieldNull(hResult, column))
                if(StrEqual(result, PROJECT_VERSION, false))
                {
                    LogMgr_Print(g_moduleCore, LogType_Debug, "CheckDBUpdate", "Database version is uptodate, no changes needed");
                    return 0;
                }
                else
                {
                    // update database to actual version
                    Format(query,sizeof(query),"UPDATE thc_rpg SET dbver='%s'",PROJECT_VERSION);
                    SQL_FastQuery(hSQL,query);
                    LogMgr_Print(g_moduleCore, LogType_Debug, "CheckDBUpdate", "Database version updated to version '%s'", PROJECT_VERSION);
                    return 1;
                }
            else
                LogMgr_Print(g_moduleCore, LogType_Error, "CheckDBUpdate", "Database query error, field is NULL");
        }
    }
    else
    {
        error=SQL_GetError(hSQL, errorbuffer, sizeof(errorbuffer));
        if(error)
            LogMgr_Print(g_moduleCore, LogType_Error, "CheckDBUpdate", "Database query error, Reason: %s", errorbuffer);
        // column does not exist, create it!
        CreateColumn(hSQL,"dbver","VARCHAR(8)");
        // set dbver to actual project version
        Format(query,sizeof(query),"UPDATE thc_rpg SET dbver='%s'",PROJECT_VERSION);
        SQL_Query(hSQL,query);
        // check for errors
        error=SQL_GetError(hSQL, errorbuffer, sizeof(errorbuffer));
        if(error)
        {
            LogMgr_Print(g_moduleCore, LogType_Error, "CheckDBUpdate", "Database query error, Reason: %s", errorbuffer);
            return -1;
        }
        else
        {
            LogMgr_Print(g_moduleCore, LogType_Debug, "CheckDBUpdate", "Successfully created necessary column 'dbver' in database");
            return 1;
        }
    }

    return 1;
}
__________________
Software/network engineer. I often work on a neat project called The Modding Community.

Check out my GitHub here!
gamemann is offline
Send a message via Skype™ to gamemann
gamemann
Veteran Member
Join Date: Sep 2009
Location: Mullica Hill, New Jersey
Old 04-14-2011 , 21:53   Re: [THC RPG] Total HardCore RPG
Reply With Quote #510

Quote:
Originally Posted by arsirc View Post
you did not overwrite the core.inc file ...

many files got changed, so please get a
complete snapshot of the new sourcecode.

i have attached a compiled version of 0.8.2_alpha for you.
!!! DONT FORGET THAT THIS IS ALPHA QUALITY !!!
thx i overwrited everything and now working on editing it for zombie escape
__________________
Software/network engineer. I often work on a neat project called The Modding Community.

Check out my GitHub here!
gamemann is offline
Send a message via Skype™ to gamemann
Reply


Thread Tools
Display Modes

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 12:08.


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