Raised This Month: $ Target: $400
 0% 

[CS:S] SQL_TQuery doesn't works ?


Post New Thread Reply   
 
Thread Tools Display Modes
delachambre
AlliedModders Donor
Join Date: Jan 2011
Location: France
Old 08-29-2012 , 15:15   Re: [CS:S] SQL_TQuery doesn't works ?
Reply With Quote #31

doesn't works.
__________________
♥ 𝕊ℙ𝕒𝕨𝕟 𝔻𝕖𝕧𝕖𝕝𝕠𝕡𝕖𝕣 [ℂ𝕊:𝕊] ♥

Clan-Nemesis
delachambre is offline
11530
Veteran Member
Join Date: Sep 2011
Location: Underworld
Old 08-29-2012 , 15:53   Re: [CS:S] SQL_TQuery doesn't works ?
Reply With Quote #32

Quote:
Originally Posted by delachambre View Post
doesn't works.
Well, it does work because I tried it, and posted you the output. This means that when I asked:

Quote:
Originally Posted by 11530 View Post
Stupid question, but since nothing works for you, I may as well ask:
  • Have you actually created the roleplay database for the plugin already?
  • Have you used the right log-in details with databases.cfg?
  • Does the MySQL user have the necessary privileges (SELECT, UPDATE)?
And you said 'yes' to all, one or more of those answers is wrong...

We'll have to go through each one carefully.

1) Post your databases.cfg file without passswords.
2) Can you use other MySQL plugins ok?
3) Post the MySQL output of
Code:
show grants for 'YOUR_USERNAME_HERE'@'localhost';
__________________

Last edited by 11530; 08-29-2012 at 17:56.
11530 is offline
delachambre
AlliedModders Donor
Join Date: Jan 2011
Location: France
Old 08-30-2012 , 03:43   Re: [CS:S] SQL_TQuery doesn't works ?
Reply With Quote #33

The problem is not SQL side, it is in the loop .... the PrintToChat not done in the game and iNum is not added to the variable "bank"
__________________
♥ 𝕊ℙ𝕒𝕨𝕟 𝔻𝕖𝕧𝕖𝕝𝕠𝕡𝕖𝕣 [ℂ𝕊:𝕊] ♥

Clan-Nemesis
delachambre is offline
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 08-30-2012 , 05:40   Re: [CS:S] SQL_TQuery doesn't works ?
Reply With Quote #34

Your mysql handle kind of weird, it is easier to register mysql connection on plugin start and then do whatever you want, without need hundred times connecting.
PHP Code:
SQL_TQuery(dbGetBankquerydata);
        
CloseHandle(db); 
I'm not sure, but I think first of these functions -> CloseHandle, will function firstly, then TQuery, because query has a time that is passed to execute it.

Or at 11530 given code, try to add a timer for 0.5 seconds delay, then use this code:
PHP Code:
    SQL_TConnect(ConnectCallback"roleplay"); 
__________________

Last edited by xbatista; 08-30-2012 at 05:58.
xbatista is offline
Send a message via Skype™ to xbatista
11530
Veteran Member
Join Date: Sep 2011
Location: Underworld
Old 08-31-2012 , 12:24   Re: [CS:S] SQL_TQuery doesn't works ?
Reply With Quote #35

Quote:
Originally Posted by delachambre View Post
The problem is not SQL side, it is in the loop .... the PrintToChat not done in the game and iNum is not added to the variable "bank"
Code:
[DONS-RP] : Vous avez reçu 100$ pour votre achat en ligne.
[ADMIN] [DRACO] 11530 :  !givemoney "STEAM_0:0:6070829" 100
...
[DONS-RP] : Vous avez reçu 300$ pour votre achat en ligne.
[ADMIN] [DRACO] 11530 :  !givemoney "STEAM_0:0:6070829" 300
Like I said, everything is working well.
__________________
11530 is offline
delachambre
AlliedModders Donor
Join Date: Jan 2011
Location: France
Old 08-31-2012 , 14:16   Re: [CS:S] SQL_TQuery doesn't works ?
Reply With Quote #36

Fixed ! Thanks a lot !
__________________
♥ 𝕊ℙ𝕒𝕨𝕟 𝔻𝕖𝕧𝕖𝕝𝕠𝕡𝕖𝕣 [ℂ𝕊:𝕊] ♥

Clan-Nemesis
delachambre is offline
11530
Veteran Member
Join Date: Sep 2011
Location: Underworld
Old 08-31-2012 , 15:54   Re: [CS:S] SQL_TQuery doesn't works ?
Reply With Quote #37

What was the answer that fixed it? Or did you forget something?
__________________
11530 is offline
delachambre
AlliedModders Donor
Join Date: Jan 2011
Location: France
Old 08-31-2012 , 16:25   Re: [CS:S] SQL_TQuery doesn't works ?
Reply With Quote #38

I have forget a little code ^^
__________________
♥ 𝕊ℙ𝕒𝕨𝕟 𝔻𝕖𝕧𝕖𝕝𝕠𝕡𝕖𝕣 [ℂ𝕊:𝕊] ♥

Clan-Nemesis
delachambre 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 16:17.


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