Why does this code:
Code:
public dbseinit() {
get_cvar_string("amx_sql_host",sqlhost,64) // Fetch the database info
get_cvar_string("amx_sql_user",sqluser,32) // stated in sql.cfg
get_cvar_string("amx_sql_pass",sqlpass,32)
get_cvar_string("amx_sql_db",sqldbname,32)
new Sql:dbiSqL = dbi_connect(sqlhost,sqluser,sqlpass,sqldbname,sqlerrormsg,255) // And connect to the database
if (dbiSqL <= SQL_FAILED) { // If there is an error
server_print("[Disturbed] %L",LANG_SERVER,"SQL_CANT_CON",sqlerrormsg) // Show the errormessage
dbi_close(dbiSqL) // Close the connection
return PLUGIN_HANDLED // Finish the plugin
}
// If Connected Successfuly
server_print("[Disturbed] %L",LANG_SERVER,"SQL_CONNECTED") // Show the Connected message
return PLUGIN_CONTINUE // And continue with the rest of plugin
}
generate this error:
Quote:
//// dbse.sma
// D:\HLServer\cstrike\addons\amxmodx\scripting\ dbse.sma(2 : warning 219: loca
l variable "dbiSqL" shadows a variable at a preceding level
|
I have tryed to change the dbiSqL to a lot of other things but nothing seems to work