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

Natives help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
PredatorBlock
AlliedModders Donor
Join Date: Apr 2020
Old 10-30-2020 , 14:03   Natives help
Reply With Quote #1

Hello

Can someone help me with this?

Code:
L 10/30/2020 - 17:55:12: Start of error session. L 10/30/2020 - 17:55:12: Not currently in a dynamic native L 10/30/2020 - 17:55:12: [AMXX] Displaying debug trace (plugin "test.amxx", version "1.0") L 10/30/2020 - 17:55:12: [AMXX] Run time error 10: native error (native "param_convert")

File: test.inc
Code:
#pragma reqlib "sql" native sql_connect(const identify[], line)

File: native.sma
Code:
public plugin_natives() {     register_library("sql")     register_native("sql_connect", "native_sql_connect", 1) } public native_sql_connect(const identify[], line) {     param_convert(1) // Strings passed byref     // Check db connection     SqlConnection = SQL_Connect(g_SqlTuple, ErrorCode, g_Error, 511)     if(SqlConnection == Empty_Handle)     {   // Check errors         Log_File(identify, line, g_Error, LOG_NAME)         SQL_FreeHandle(SqlConnection)         return -1     }         return 1 }

File: test.sma
Code:
if(sql_connect("test.sma", __LINE__) == 1) { client_print(0, print_chat, "Successfully connected!") }

Last edited by PredatorBlock; 10-30-2020 at 14:47.
PredatorBlock is offline
loiraolhosazul
Member
Join Date: May 2020
Old 10-30-2020 , 16:34   Re: Natives help
Reply With Quote #2

Check this: https://forums.alliedmods.net/showthread.php?t=41251
loiraolhosazul is offline
PredatorBlock
AlliedModders Donor
Join Date: Apr 2020
Old 10-31-2020 , 11:26   Re: Natives help
Reply With Quote #3

Quote:
Originally Posted by loiraolhosazul View Post
Fixed, thank you.
PredatorBlock is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 10-31-2020 , 11:35   Re: Natives help
Reply With Quote #4

who's mysql data you want to get ? ;o
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)
JocAnis is offline
PredatorBlock
AlliedModders Donor
Join Date: Apr 2020
Old 10-31-2020 , 19:57   Re: Natives help
Reply With Quote #5

Code:
new const menu3_adm_langs[][] = { "MENU_ADMIN31", "MENU_ADMIN32", "MENU_ADMIN33", "MENU_ADMIN34", "MENU_ADMIN35""MENU_ADMIN36", "MENU_ADMIN37" , "MENU_ADMIN37" , "MENU_ADMIN37" , "MENU_ADMIN37" , "MENU_ADMIN37" , "MENU_ADMIN37" }

How i can retrieve a total of number from a constant?

eg: Total = 12

Thanks.
PredatorBlock is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 11-01-2020 , 07:03   Re: Natives help
Reply With Quote #6

sizeof menu3_adm_langs
__________________








CrazY. is offline
PredatorBlock
AlliedModders Donor
Join Date: Apr 2020
Old 11-01-2020 , 07:20   Re: Natives help
Reply With Quote #7

Quote:
Originally Posted by CrazY. View Post
sizeof menu3_adm_langs
Thank you, i appreciate.
PredatorBlock is offline
Old 11-01-2020, 13:00
PredatorBlock
This message has been deleted by PredatorBlock.
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 18:58.


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