Raised This Month: $19 Target: $400
 4% 

Run time error 10


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Molecula
Junior Member
Join Date: Feb 2013
Old 11-04-2019 , 04:05   Run time error 10
Reply With Quote #1

Hi guys!
I got this runtime error, if someone could please help me.
I`m using amxmodx 1.9.
Code:
L 11/04/2019 - 10:50:37: Function is not present (function "nanosuit_msg") (plugin "nanosuit_advanced.amxx")
L 11/04/2019 - 10:50:37: [AMXX] Displaying debug trace (plugin "nanosuit_advanced.amxx", version "12.3")
L 11/04/2019 - 10:50:37: [AMXX] Run time error 10: native error (native "set_task")
L 11/04/2019 - 10:50:37: [AMXX]    [0] nanosuit_advanced.sma::plugin_init (line 650)
1. first question is if this can give you any errors, i just deactivated the function.
  1. Function is not present (function "nanosuit_msg")

2. second what can i do about the runtime error, this is the whole function, the line with the error is the very last.
Code:
set_task(60.0,"nanosuit_msg", 674837, _, _, "b", 0)

Code:
public plugin_init()
{
	// Register the plugin
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_cvar("nanosuit_version", VERSION, FCVAR_SERVER)
	
	//register_clcmd("say /nanosuit", "nanosuit_menu_show")
	//register_clcmd("say_team /nanosuit", "nanosuit_menu_show")
	//register_clcmd("nanosuit", "nanosuit_menu_show")
	//register_clcmd("say /nanolowres", "nanosuit_low_res_toggle")
	//register_clcmd("say_team /nanolowres", "nanosuit_low_res_toggle")
	//register_clcmd("nanolowres", "nanosuit_low_res_toggle")
	//register_clcmd("nanobuydddie","nanosuit_buy")
	//register_clcmd("say /nanobuy","nanosuit_buy")
	//register_clcmd("say_team /nanobuy","nanosuit_buy")
	//register_clcmd("nanohelp","nanosuit_help")
	//register_clcmd("say /nanohelp","nanosuit_help")
	//register_clcmd("say_team /nanohelp","nanosuit_help")
	
	// The pcvars
	pcv_nn_price      = register_cvar("nanosuit_price","0")
	pcv_nn_death      = register_cvar("nanosuit_death_remove","1")
	pcv_nn_buyzone    = register_cvar("nanosuit_buyzone","1")
	pcv_nn_ff         = get_cvar_pointer("mp_friendlyfire")
	pcv_nn_bot        = register_cvar("nanosuit_bot_allow","0")
	pcv_nn_bot_buy    = register_cvar("nanosuit_bot_buy_mode","0")  // 0 on round start 1 on spawn
	pcv_nn_night	  = register_cvar("nanosuit_nightvision","1")
	pcv_nn_team		  = register_cvar("nanosuit_team_allow","2") // 1 T 2 CT 3 both
	pcv_zm_regive	  = register_cvar("nanosuit_disinfect_regive", "1")
	
	pcv_nn_energy     = register_cvar("nanosuit_energy","100")
	pcv_nn_critical   = register_cvar("nanosuit_critical","10")
	
	pcv_nn_health     = register_cvar("nanosuit_health","100")
	pcv_nn_armor      = register_cvar("nanosuit_armor","200")
	
	pcv_nn_regenerate = register_cvar("nanosuit_regenerate","0.75")
	pcv_nn_hp_charge  = register_cvar("nanosuit_hpcharge","5")
	pcv_nn_ap_charge  = register_cvar("nanosuit_apcharge","7")
	
	pcv_nn_ar_speed   = register_cvar("nanosuit_armor_speed","1.0")
	pcv_nn_ar_damage  = register_cvar("nanosuit_armor_damage","0.85")
	
	pcv_nn_st_impulse = register_cvar("nanosuit_strength_impulse","460")
	pcv_nn_st_stab    = register_cvar("nanosuit_strength_stab","10")
	pcv_nn_st_jump    = register_cvar("nanosuit_strength_jump","15")
	pcv_nn_st_throw   = register_cvar("nanosuit_strength_throw","600")
	pcv_nn_st_rec_att = register_cvar("nanosuit_strength_recoil_attenuation","1.75")
	pcv_nn_st_rec_en  = register_cvar("nanosuit_strength_recoil_energy","1.5")
	pcv_nn_st_g_throw = register_cvar("nanosuit_strength_grenade_throw","3.0")
	pcv_nn_st_can_th  = register_cvar("nanosuit_strength_throw_override","1")
	
	pcv_nn_sp_maxim   = register_cvar("nanosuit_speed_maximum","2.4")
	pcv_nn_sp_critic  = register_cvar("nanosuit_speed_critical","1.40")
	pcv_nn_sp_energy  = register_cvar("nanosuit_speed_energy","3.6")
	pcv_nn_sp_fattack = register_cvar("nanosuit_speed_fast_attack", "2.0")
	pcv_nn_sp_fatshre = register_cvar("nanosuit_speed_fast_sh_reload", "2.5")
	pcv_nn_sp_reload  = register_cvar("nanosuit_speed_fast_reload", "5.0")
	pcv_nn_sp_ground  = register_cvar("nanosuit_ground_affect", "2") // 0 normal ground, 1 also crouch, 2 water, 3 water + crouch
	
	pcv_nn_cl_energy  = register_cvar("nanosuit_cloak_energy","0.65")
	pcv_nn_cl_fire    = register_cvar("nanosuit_cloak_punish_weapon_fire","1")
	pcv_nn_cl_knife   = register_cvar("nanosuit_cloak_punish_knife_usage","1")
	pcv_nn_cl_grenade = register_cvar("nanosuit_cloak_punish_grenade_throw","1")
	pcv_nn_cl_c4      = register_cvar("nanosuit_cloak_punish_c4","1")
	
	// Fakemeta forwards
	register_forward(FM_PlayerPreThink, "fw_prethink")
	register_forward(FM_PlayerPostThink, "fw_postthink")
	register_forward(FM_SetModel, "fw_setmodel",1)
	
	if (!glb_use_new_models)
	{
		server_print("[NANO] No models found, not registering the model block forwards!")
	}
	else
	{
		server_print("[NANO] Models found, activating model block forwards!")
		register_forward(FM_SetClientKeyValue, "fw_setclientkey")
		//register_event("TeamInfo","event_teaminfo","a")
		register_forward(FM_ClientUserInfoChanged, "fw_clientuserinfochanged")
	}
	
	// Ham forwards (yummy)
	RegisterHam(Ham_CS_RoundRespawn,"player","fw_spawn",1)
	RegisterHam(Ham_Spawn,"player","fw_spawn",1)
	RegisterHam(Ham_Killed,"player","fw_killed")
	RegisterHam(Ham_Player_ResetMaxSpeed,"player","fw_resetmaxspeed",1)
	
	new weapon_name[24]
	
	// Register all weapons for special functions
	for (new i=CSW_P228;i<=CSW_P90;i++)
	{
		if (!(UNREGISTERED_WEAPONS_BITSUM & 1<<i) && get_weaponname(i, weapon_name, charsmax(weapon_name)))
		{
			RegisterHam(Ham_Weapon_PrimaryAttack, weapon_name, "fw_primary_attack")
			RegisterHam(Ham_Weapon_PrimaryAttack, weapon_name, "fw_primary_attack_post",1)
			RegisterHam(Ham_Weapon_SecondaryAttack, weapon_name, "fw_secondary_attack")
			RegisterHam(Ham_Weapon_SecondaryAttack, weapon_name, "fw_secondary_attack_post",1)
			
			if (!(NO_RELOAD_WEAPONS_BITSUM & (1<<i)))
			{
				RegisterHam(Ham_Weapon_Reload, weapon_name, "fw_reload_post", 1)
			}
			else
			{
				if (i != CSW_KNIFE)
				{
					RegisterHam(Ham_Item_Deploy, weapon_name, "fw_shotgun_deploy", 1)
					RegisterHam(Ham_Weapon_Reload, weapon_name, "fw_special_reload_post", 1)
				}
			}
			
			
			format(wpn_ms_icon[i],13,"d_%s",weapon_name[7])
			replace(weapon_name,charsmax(weapon_name),"navy","")
			format(wpn_v_model[i],29,"models/v_%s.mdl",weapon_name[7])
			
		}
		
		if (WEAPONS_WITH_SHIELD_BITSUM & 1<<i)
		{
			format(wpn_v_shield_model[i],49,"models/shield/v_shield_%s.mdl",weapon_name[7])
		}
	}
	
	// Let's add the c4
	format(wpn_v_model[CSW_C4],29,"models/v_c4.mdl")
	
	format(wpn_v_model[CSW_SMOKEGRENADE],29,"models/v_smokegrenade.mdl")
	format(wpn_v_model[CSW_FLASHBANG],29,"models/v_flashbang.mdl")
	format(wpn_v_model[CSW_HEGRENADE],29,"models/v_hegrenade.mdl")
	
	format(wpn_v_shield_model[CSW_SMOKEGRENADE],49,"models/shield/v_shield_smokegrenade.mdl")
	format(wpn_v_shield_model[CSW_FLASHBANG],49,"models/shield/v_shield_flashbang.mdl")
	format(wpn_v_shield_model[CSW_HEGRENADE],49,"models/shield/v_shield_hegrenade.mdl")
	
	get_weaponname(CSW_C4, weapon_name, charsmax(weapon_name))
	
	RegisterHam(Ham_Weapon_PrimaryAttack, weapon_name, "fw_bomb_planting")
	RegisterHam(Ham_Use, "grenade", "fw_bomb_defusing")
	
	
	// In the previous function we didn't register the grenades
	wpn_ms_icon[CSW_HEGRENADE] = 	"d_grenade"
	wpn_ms_icon[CSW_FLASHBANG] = 	"d_grenade"
	wpn_ms_icon[CSW_SMOKEGRENADE] = "d_grenade"
	
	// Global Stuff
	glb_maxplayers = global_get(glb_maxClients)
	
	// Events
	register_event("CurWeapon", "event_active_weapon", "be","1=1")
	register_event("DeathMsg", "event_death", "ae")
	
	register_logevent("event_startround", 2, "1=Round_Start")
	
	
	// Register dictionary (for multilanguage)
	register_dictionary("nanosuit.txt")
	
	// Tolls
	nd_hud_sync = CreateHudSyncObj()
	
	// Message variables
	nd_msg_saytext 		= get_user_msgid("SayText")
	nd_msg_damage 		= get_user_msgid("Damage")
	nd_msg_iconstatus 	= get_user_msgid("StatusIcon")
	nd_msg_shadowidx  	= get_user_msgid("ShadowIdx")
	nd_msg_ammox		= get_user_msgid("AmmoX")
	
	// Hud status display
	nd_ent_monitor = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"))
	
	if (nd_ent_monitor)
	{
		set_pev(nd_ent_monitor, pev_classname, "screen_status")
		set_pev(nd_ent_monitor, pev_nextthink, get_gametime() + 0.1)
		
		register_forward(FM_Think, "fw_screenthink")
	}
	
	set_task(1.0,"plugin_init_delay",674832)
	set_task(60.0,"nanosuit_msg", 674837, _, _, "b", 0)
}
Thank you !
Molecula is offline
LearninG
Senior Member
Join Date: Apr 2019
Location: Iran
Old 11-04-2019 , 04:59   Re: Run time error 10
Reply With Quote #2

there must be function named with "nanosuit_msg" :
Code:
public nanosuit_msg() { }

Last edited by LearninG; 11-04-2019 at 05:00.
LearninG is offline
Molecula
Junior Member
Join Date: Feb 2013
Old 11-04-2019 , 05:04   Re: Run time error 10
Reply With Quote #3

Quote:
Originally Posted by LearninG View Post
there must be function named with "nanosuit_msg" :
Code:
public nanosuit_msg() { }
hi man,
is this what causes it?, oh I m dub, of course, it's calling it, delete this guys...

Last edited by Molecula; 11-04-2019 at 05:19. Reason: I'm dumb
Molecula is offline
LearninG
Senior Member
Join Date: Apr 2019
Location: Iran
Old 11-04-2019 , 05:36   Re: Run time error 10
Reply With Quote #4

you were passing a function name which not even exist in your code , thats why you got runtime error.
LearninG is offline
Reply


Thread Tools
Display Modes

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:57.


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