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

#include <dbi> error;dbi.inc


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
rwhere
Junior Member
Join Date: Sep 2006
Old 09-10-2006 , 17:59   #include <dbi> error;dbi.inc
Reply With Quote #1

Hi im writing a sql database for Counter Strike and after i compile this code:

Code:
#include <amxmodx>
#include <amxmisc>
#include <dbi>
public plugin_init() {
    register_plugin("1","1", "fatal")
    register_concmd("seemeeid","steamid",ADMIN_SLAY,"this is a descripption")
    register_concmd("server_getgac","gac",ADMIN_SLAY,"Get your GAC");
}
public steamid(id)
{
    new theid[35]
    get_user_authid(id,theid,34)
client_print(id,print_chat,"this is your id: %s",theid)    
}
public client_connect(id)
{
client_cmd(id,"bind f4 seemeeid")    
}
public client_authorized(id)
{
    new theid[35]
    get_user_authid(id,theid,34)
    client_print(id,print_chat,"this is your id: %s",theid)    


}
the script doesnt work.im running a half life dedicated server C:\HLServer\. There is no compie error. But if i remove #include <dbi> it works, still no compile error.
This is the working source code:
Code:
#include <amxmodx>
#include <amxmisc>
public plugin_init() {
    register_plugin("1","1", "fatal")
    register_concmd("seemeeid","steamid",ADMIN_SLAY,"this is a descripption")
    register_concmd("server_getgac","gac",ADMIN_SLAY,"Get your GAC");
}
public steamid(id)
{
    new theid[35]
    get_user_authid(id,theid,34)
client_print(id,print_chat,"this is your id: %s",theid)    
}
public client_connect(id)
{
client_cmd(id,"bind f4 seemeeid")    
}
public client_authorized(id)
{
    new theid[35]
    get_user_authid(id,theid,34)
    client_print(id,print_chat,"this is your id: %s",theid)    

}
But i still want to connnect to a database and the dbi include doesnt let me.
Its probably one of the files when running my dedicated server as there is no compile error.

Can someone please help me?
rwhere is offline
Silver Dragon
Veteran Member
Join Date: Jan 2005
Location: Chicago, Illinois
Old 09-10-2006 , 21:23   Re: #include <dbi> error;dbi.inc
Reply With Quote #2

Wrong Section.
__________________

Silver Dragon is offline
Send a message via AIM to Silver Dragon Send a message via MSN to Silver Dragon Send a message via Yahoo to Silver Dragon
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 09-10-2006 , 22:06   Re: #include <dbi> error;dbi.inc
Reply With Quote #3

Like Silver Dragon said this is the wrong section. This is for normal AMX Mod X Support. This should of been posted in the scripting help section.

Quote:
Originally Posted by rwhere
But i still want to connnect to a database and the dbi include doesnt let me.
Btw you should be looking at other script that use database for examples. By just doing a #include <dbi> will not making it so you can connect to a database without coding it for it. There are some examples in the link below.

http://forums.alliedmods.net/showthread.php?t=40737
http://wiki.alliedmods.net/index.php...29#SQL_Support
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
rwhere
Junior Member
Join Date: Sep 2006
Old 09-11-2006 , 01:48   Re: #include <dbi> error;dbi.inc
Reply With Quote #4

Yeah i know but still when i include the file it stopps it from working. The whole script.
And im only looking at the dbi file and why it might not be working with AMX Mod X. and HLServer.
rwhere is offline
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 09-11-2006 , 03:26   Re: #include <dbi> error;dbi.inc
Reply With Quote #5

dbi is a multi type module. It control mysql and sqlite. You need to enable the correct module to be able to use. mysql_amxx or sqlite_amxx.

Like I said just by including #include <dbi> and enabling the correct module will not make it connect to your database without coding for it.
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
rwhere
Junior Member
Join Date: Sep 2006
Old 09-11-2006 , 03:34   Re: #include <dbi> error;dbi.inc
Reply With Quote #6

I enabled the modules and it worked, Thanks
rwhere is offline
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 17:07.


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