AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Achievements (https://forums.alliedmods.net/showthread.php?t=149342)

Ashcan 07-10-2011 11:11

Re: Achievements
 
Hello
1st had problem with connection to my localhost sql base but i just created random user with no password and now it works...
But not fully ;]

Now i got error:
Code:

( 31) Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"Achievement" ( "name" VARCHAR(32) NOT NULL, "authid" VARCHAR(35) NOT NULL, "dat' at line 1

GANGSTA_ 07-12-2011 08:22

Re: Achievements
 
Can u made achivements for hidenseek?

Ashcan 07-15-2011 07:10

Re: Achievements
 
Quote:

Originally Posted by Ashcan (Post 1507824)
Hello
1st had problem with connection to my localhost sql base but i just created random user with no password and now it works...
But not fully ;]

Now i got error:
Code:

( 31) Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"Achievement" ( "name" VARCHAR(32) NOT NULL, "authid" VARCHAR(35) NOT NULL, "dat' at line 1


F5

Pastout 07-15-2011 08:48

Re: Achievements
 
Ashcan ~ Can you go to your sql.cfg file located in your configs folder. Then open it and make sure your information is 100% correct and your data base is working.

Inside the file you should see something like this make sure it has ALL the right information.

amx_sql_host "127.0.0.1"
amx_sql_user "root"
amx_sql_pass ""
amx_sql_db "amx"
amx_sql_table "admins"
amx_sql_type "mysql"

Let me know how this goes and thanks for posting.

vaan123 07-15-2011 13:28

Re: Achievements
 
first of all, thank you for your hard work.

second,

is there a way i can add rewards other than CS default weapons, like bazooka for example? or Cross-Bow.

Exolent[jNr] 07-15-2011 13:31

Re: Achievements
 
Quote:

Originally Posted by Pastout (Post 1511137)
Ashcan ~ Can you go to your sql.cfg file located in your configs folder. Then open it and make sure your information is 100% correct and your data base is working.

Syntax error is a problem with your query formatting.
You would get a connection error if it could not connect.

asdfdsdf 07-15-2011 14:35

Re: Achievements
 
can you make achievements for zombie plague 4.3 would be very nice

YakumoHiratsuhi 07-15-2011 22:17

Re: Achievements
 
gotta keep this code on my vault :mrgreen:
awesome job :up:

Ashcan 07-16-2011 05:55

Re: Achievements
 
Quote:

Originally Posted by Pastout (Post 1511137)
Ashcan ~ Can you go to your sql.cfg file located in your configs folder. Then open it and make sure your information is 100% correct and your data base is working.

Inside the file you should see something like this make sure it has ALL the right information.

amx_sql_host "127.0.0.1"
amx_sql_user "root"
amx_sql_pass ""
amx_sql_db "amx"
amx_sql_table "admins"
amx_sql_type "mysql"

Let me know how this goes and thanks for posting.

Im pretty sure because i got amxbans on same database and its working...

Quote:

Originally Posted by Exolent[jNr] (Post 1511332)
Syntax error is a problem with your query formatting.
You would get a connection error if it could not connect.

True, but any solution? :)


Whenever ever i connect to base (even without using password), i get a new error about my syntax ;/

And some new things, when using nvault, achievements plugin is running but its not adding nothing when i plant bomb or whatever ;/

marcioandre 07-19-2011 00:24

Re: Achievements
 
FIX Line:675

Code:

        SQL_ThreadQuery(g_sql_tuple, "QueryCreateTable", "CREATE TABLE IF NOT EXISTS `Achievement` ( `name` VARCHAR(32) NOT NULL, `authid` VARCHAR(35) NOT NULL, `data` VARCHAR(256) NOT NULL );")
fix line : 2638

Code:

        formatex(query, sizeof(query) - 1, "SELECT data FROM Achievement WHERE authid = ^"%s^";", g_iAuthID[ id ] )
fix line :2742
Code:

static query[ 256 ]
        if( g_loaded_data[ id ] )
        {
                formatex( query, sizeof( query ) - 1, "UPDATE Achievement SET name = ^"%s^", data = ^"%s^" WHERE authid = ^"%s^";", name, data, g_iAuthID[ id ] )
        }
        else
        {
                formatex( query, sizeof( query ) - 1, "INSERT INTO Achievement ( name, authid, data ) VALUES ( ^"%s^", ^"%s^", ^"%s^" );", name, g_iAuthID[ id ], data )
        }

Quote:

Originally Posted by Ashcan (Post 1511722)
Im pretty sure because i got amxbans on same database and its working...



True, but any solution? :)


Whenever ever i connect to base (even without using password), i get a new error about my syntax ;/

And some new things, when using nvault, achievements plugin is running but its not adding nothing when i plant bomb or whatever ;/



All times are GMT -4. The time now is 23:25.

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