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

[TF2] TF2 Item DB (replaces tf2itemsinfo)


Post New Thread Reply   
 
Thread Tools Display Modes
marlonsw
Senior Member
Join Date: Apr 2013
Old 01-27-2017 , 16:57   Re: [TF2] TF2 Item DB (replaces tf2itemsinfo)
Reply With Quote #121

A help, I downloaded the tf2idb.zip, unzipped and downloaded the python.

Edited the tf2idb.py in notepat + + and put the following parameters:

Code:
TF_FOLDER = 'C:\Server TF2 NOW\steamapps\common\Team Fortress 2 Dedicated Server\tf'
ITEMS_GAME = TF_FOLDER + 'scripts\items\items_game.txt'
DB_FILE = TF_FOLDER + 'addons\sourcemod\data\sqlite\tf2idb.sq3'
then I tried to run the file by clicking 2 times. Until the error manually.

Questions, need to put the plugin. smx and run the server first? or do I need to put first the old tf2idb.sq3 to be updated?

Another doubt, if I use this plugin works normally for the plugins depends on the TF2ItemsInfo or the dependent plugin has to be modified to support the TF2 Item DB?

Last edited by marlonsw; 01-27-2017 at 16:59.
marlonsw is offline
Wormy
Senior Member
Join Date: Jan 2013
Location: 2fort
Old 01-29-2017 , 07:26   Re: [TF2] TF2 Item DB (replaces tf2itemsinfo)
Reply With Quote #122

Quote:
Originally Posted by Wormy View Post
I'm getting these errors when trying to compile.

Code:
tf2idb_tf2ii_compat.sp(269) : error 029: invalid expression, assumed zero
tf2idb_tf2ii_compat.sp(269) : error 029: invalid expression, assumed zero
tf2idb_tf2ii_compat.sp(269) : warning 215: expression has no effect
tf2idb_tf2ii_compat.sp(269) : error 001: expected token: ";", but found "]"
tf2idb_tf2ii_compat.sp(269) : fatal error 190: too many error messages on one line
Alright I fixed it, but is the PLUGIN_UPDATE_URL meant to be empty?

Code:
//#define PLUGIN_UPDATE_URL	"http://cdn.hop.tf/tf2itemsinfo/updatelist.txt"
#define PLUGIN_UPDATE_URL ""
I put the commented url to the same one, and then it worked.

However after trying the plugins now I get these errors in the logs. Same issue as https://forums.alliedmods.net/showpo...&postcount=117

Code:
L 01/29/2017 - 07:33:00: [SM] Exception reported: Call was aborted
L 01/29/2017 - 07:33:00: [SM] Exception reported: Invalid query Handle 0 (error: 4)
L 01/29/2017 - 07:33:00: [SM] Blaming: tf2idb.smx
L 01/29/2017 - 07:33:00: [SM] Call stack trace:
L 01/29/2017 - 07:33:00: [SM]   [0] SQL_FetchRow
L 01/29/2017 - 07:33:00: [SM]   [1] Line 209, sourcemod\addons\sourcemod\scripting\tf2idb.sp::PrepareCache
L 01/29/2017 - 07:33:00: [SM]   [2] Line 148, sourcemod\addons\sourcemod\scripting\tf2idb.sp::OnPluginStart
L 01/29/2017 - 07:33:00: [SM] Unable to load plugin "tf2idb.smx": Error detected in plugin startup (see error logs)
L 01/29/2017 - 07:33:00: [SM] Unable to load plugin "tf2idb_tf2ii_compat.smx": Could not find required plugin "tf2idb"
__________________

Last edited by Wormy; 01-29-2017 at 07:48.
Wormy is offline
FlaminSarge
Veteran Member
Join Date: Jul 2010
Old 01-29-2017 , 19:19   Re: [TF2] TF2 Item DB (replaces tf2itemsinfo)
Reply With Quote #123

@kamild1996 replace_table does all the table renaming at the end in the py script

@Wormy the only reason I could think of for that is that the sq3 DB file being used isn't the same version as the plugin version. Maybe it would be good to have a 'DB schema version' check somewhere.

Any bugs with my changes to this plugin should be filed at https://github.com/flaminsarge/tf2idb/issues with as much information as you can possibly provide.
__________________
Bread EOTL GunMettle Invasion Jungle Inferno 64-bit will break everything. Don't even ask.

All plugins: Randomizer/GiveWeapon, ModelManager, etc.
Post in plugin threads with questions.
Steam is for playing games.
You will be fed to javalia otherwise.
Psyduck likes replays.

Last edited by FlaminSarge; 01-29-2017 at 19:22.
FlaminSarge is offline
Wormy
Senior Member
Join Date: Jan 2013
Location: 2fort
Old 01-30-2017 , 14:17   Re: [TF2] TF2 Item DB (replaces tf2itemsinfo)
Reply With Quote #124

Filed an issue to the GitHub page now, hope it's got enough information to determine what's possibly wrong.
__________________
Wormy is offline
bottiger
AlliedModders Donor
Join Date: Dec 2010
Old 02-09-2017 , 15:40   Re: [TF2] TF2 Item DB (replaces tf2itemsinfo)
Reply With Quote #125

Quote:
Originally Posted by Chdata View Post
A quick lookthrough and I see it does some unthreaded queries for natives and stuff.

Is that safe?

Ever since I was a young-un I was taught that unthreaded queries are the plague.

Could it ever cause bad lag?

Why/Why not?

I was told that even for SQLite it's good to do threaded with a callback because it can still take time to read the database if it's large or something.

----

Maybe a better question is, when is it alright to use unthreaded queries, considering the functions for doing that still exist anyway?

I assume that means there is sooome place where they're applicable?
You don't need threaded queries for local databases with fast queries which is what most people use tf2idb for. It is simpler to develop and probably faster in the normal case.You don't really want to have to deal with callbacks just to get some item information.

If you want to run some extremely complicated query several times a second, then you should probably add a threaded method.

If this wasn't "safe" this plugin wouldn't have hundreds of users.
__________________

Last edited by bottiger; 02-09-2017 at 15:41.
bottiger is offline
Zolika1351
Junior Member
Join Date: Jun 2015
Old 04-18-2017 , 07:07   Re: [TF2] TF2 Item DB (replaces tf2itemsinfo)
Reply With Quote #126

Traceback (most recent call last):
File "D:\!STEAMCMD_SERVER\tf2_normalserver\tf\addo ns\sourcemod\tf2idb\tf2idb.py", line 129, in <module>
dbc.execute('INSERT INTO new_tf2idb_capabilities (id,capability) VALUES (?,?)', (id, name))
NameError: name 'name' is not defined
0
Traceback (most recent call last):
File "D:\!STEAMCMD_SERVER\tf2_normalserver\tf\addo ns\sourcemod\tf2idb\tf2idb.py", line 129, in <module>
dbc.execute('INSERT INTO new_tf2idb_capabilities (id,capability) VALUES (?,?)', (id, name))
NameError: name 'name' is not defined

Got this error when trying to run tf2idb.py.
Zolika1351 is offline
caxanga334
Member
Join Date: Nov 2013
Location: Brazil
Old 05-12-2017 , 20:51   Re: [TF2] TF2 Item DB (replaces tf2itemsinfo)
Reply With Quote #127

I am getting this error when running tf2idb.py on Python 3.6.1
Quote:
Traceback (most recent call last):
File "E:\Server\tf2_host\update\tf2idb.py", line 129, in <module>
dbc.execute('INSERT INTO new_tf2idb_capabilities (id,capability) VALUES (?,?)', (id, name))
NameError: name 'name' is not defined
0
Traceback (most recent call last):
File "E:\Server\tf2_host\update\tf2idb.py", line 129, in <module>
dbc.execute('INSERT INTO new_tf2idb_capabilities (id,capability) VALUES (?,?)', (id, name))
NameError: name 'name' is not defined
caxanga334 is offline
fakuivan
Senior Member
Join Date: Nov 2015
Old 05-15-2017 , 21:22   Re: [TF2] TF2 Item DB (replaces tf2itemsinfo)
Reply With Quote #128

Quote:
Originally Posted by caxanga334 View Post
I am getting this error when running tf2idb.py on Python 3.6.1
That script is ment to be run using python 2, or you can try my python 3 script. I'd appreciate if bottiger mentioned in the post...
__________________
fakuivan is offline
Darthmule
AlliedModders Donor
Join Date: May 2012
Location: Netherlands
Old 06-03-2017 , 05:50   Re: [TF2] TF2 Item DB (replaces tf2itemsinfo)
Reply With Quote #129

Quote:
Originally Posted by fakuivan View Post
That script is ment to be run using python 2, or you can try my python 3 script. I'd appreciate if bottiger mentioned in the post...
Except it works fine on Python 3.6.1, even used it this morning after the TF2 update.
Darthmule is offline
MingYao_Koh
New Member
Join Date: Jun 2017
Old 06-25-2017 , 13:39   Re: [TF2] TF2 Item DB (replaces tf2itemsinfo)
Reply With Quote #130

@fakuivan I'm facing problem with the tf2idb.py file you provided while running Python 3.6.1(through cmd.exe)
Code:
C:\Users\User>C:\hlserver\tf2idb.py
Loading configs...
Traceback (most recent call last):
   File "C:\hlserver\tf2idb.py", line 25, in <module>
      parsedconfig = vdf.parse(cfh)
   File "C:\hlserver\vdf.py", line 93, in parse
      line += "\n" + itr.next()
AttributeError: 'list_iterator' object has no attribute 'next'
Fyi I had modified the tfidb.configs.txt according to the correct directory
MingYao_Koh is offline
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 03:10.


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