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

Problems with menu + SQLite.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 07-26-2011 , 15:59   Problems with menu + SQLite.
Reply With Quote #1

ok , i have this menu.

Code:
public Handled(Handle:db, Handle:hQuery, const String:error[], any:client) {     if(hQuery == INVALID_HANDLE) {         LogError("Query failed: %s", error);         return;     }         new Handle:menu = CreateMenu(MenuHandler1);     SetMenuTitle(menu, "Top Mejores Kills - by Luqqas'");     decl String:ggBuffer[256]     new i = 0     decl String:Buffer[256]      decl String:Name[33]     while( SQL_FetchRow(hQuery) )     {         SQL_FetchString(db, 1, Name, 355)                 FormatEx(Buffer, 255, "%s - %d", Name, SQL_FetchInt(hQuery, 3) );         FormatEx(ggBuffer, sizeof(ggBuffer) , "option%d", i)         AddMenuItem(menu, ggBuffer, Buffer);                 SQL_FetchRow(hQuery);     }     SetMenuExitButton(menu, true);     DisplayMenu(menu, client, 20);     CloseHandle(hQuery); }

Why isn't working ? Can any says me what i'm wrong ?

PS : I try to copy the same code from a plugin that i made in AMX.
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 07-27-2011 , 19:05   Re: Problems with menu + SQLite.
Reply With Quote #2

Solved , change

Code:
SQL_FetchString(db, 1, Name, 355)
to
Code:
SQL_FetchString(hQuery, 1, Name, 355)

__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
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 12:32.


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