Raised This Month: $ Target: $400
 0% 

dbi_mysql doesnt see any tables /!\


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
AoD90
Senior Member
Join Date: Jul 2008
Location: Ugljevik/RS/BIH
Old 11-07-2009 , 05:31   Re: CLCMD with extra string
Reply With Quote #1

Code:
public plugin_init() {
register_clcmd("say_team","cmdSay")
register_clcmd("say","cmdSay")
}

public cmdSay(id)
{
        new komanda[12]
        new text[200]
        new YourReason[32]
        read_args(text,199)
        remove_quotes(text)
        read_argv(0, komanda, 11)

        strtok(text, komanda, 11, text, 199, ' ')    
        
        if (equali(komanda, "/command"))
        {
                     strtok(text, YourReason, 31, text, 199, ' ')
         }
         return PLUGIN_CONTINUE
}
AoD90 is offline
Send a message via MSN to AoD90
nismo
BANNED
Join Date: Oct 2009
Location: Latvia, Riga
Old 11-07-2009 , 08:06   Re: CLCMD with extra string
Reply With Quote #2

Thanks, that part works well, but now I`m a bit stuck with the mysql part.

I'm trying to use sqlite module, so I enabled it in the modules.ini file. But it seems that my plugin can't find any tables in my database. I'm also using the 'mysql' module for amxbans.

Console output:
[CALLADMIN]: Connected succesfully (localhost,CSuser,CSuser,*mypass*)!
[CALLADMIN]: Table Does not Exists!

Table really exists:


Whole code:
http://pastebin.com/me5f515f

Thanks!
nismo is offline
Send a message via Skype™ to nismo
AoD90
Senior Member
Join Date: Jul 2008
Location: Ugljevik/RS/BIH
Old 11-07-2009 , 14:05   Re: dbi_mysql doesnt see any tables /!\
Reply With Quote #3

I'm no expert but I think this part need some changes:

Code:
if (equali(komanda, "/calladmin")) {

        if(!equali(text, "") && !equali(text, " ")) {




if (equali(komanda, "/calladmin")) {
            new cmdtext[32]
            strtok(text, cmdtext, 31, text, 199, ' ')

        if(!equali(cmdtext, "") && !equali(cmdtext, " ")) {
AoD90 is offline
Send a message via MSN to AoD90
nismo
BANNED
Join Date: Oct 2009
Location: Latvia, Riga
Old 11-07-2009 , 14:12   Re: dbi_mysql doesnt see any tables /!\
Reply With Quote #4

As I said, that part is running good, output for 'text' is ok.

The problem is with 'sqlite' module. First of all, I get

[CALLADMIN]: Table Does not Exists!

from

if(!sqlite_table_exists(mysql, "server_calladmin")) server_print("[CALLADMIN]: Table Does not Exists!")

And if I try to run the command e.g. '/calladmin asdf' i get this:

[CALLADMIN]: no such table: server_calladmin|1

It's something to do with sqlite. Also updated the 'sqlite' library's for my server, the same result. The same with any other tables, databases, users.
nismo is offline
Send a message via Skype™ to nismo
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 17:47.


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