Raised This Month: $ Target: $400
 0% 

Why am I getting this error?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Jordan
Veteran Member
Join Date: Aug 2005
Old 03-11-2006 , 23:45   Why am I getting this error?
Reply With Quote #1

For some reason I'm getting a runtime error on set_user_frags, but the plugin is working. o.O

Code:
/* Plugin generated by AMXX-Studio */ #include <amxmodx>   #include <csstats>   #include <cstrike>   #include <fun>   /*Description What this plugin does is determine a user's overall kills/deaths and sets their scores accordingly. So, if I have for example 300 kills and 123 deaths, when I join the server my score will be 300-123. Credits: GHW_Chronic - Coding help. v3x - Coding help.                     Changelog                 v. 1.0 - Original Coding                 v. 1.1 - Addition of Description, credits, changelog                 v. 1.2 - Coding Optimization                 v. 1.3 - Removed sv_restartround bug.                 v. 1.4 - Added new event.                 v. 1.5 - Fixed bug! :)*/ new bool:gSet[33]; new gStats[8]; new gBodyhits[8]; public plugin_init() {       register_plugin("Set Stats", "1.5", "Satan")     register_event("ResetHUD" , "round", "be")     register_event("TextMsg", "event_game_will_restart", "a", "2=#Game_will_restart_in")     register_logevent("new_round" , 2 , "1=Round_Start");       register_logevent("MyFuncRoundStart", 2, "0=World triggered", "1=Round_Start") }   //------------------------------------------------------------------- public client_connect(id) {     gSet[id] = false } //------------------------------------------------------------------- public new_round(id) {     set_task(0.1, "set_stats", id) } //------------------------------------------------------------------- public round(id) {     set_task(0.1, "set_stats", id) } //------------------------------------------------------------------- public event_game_will_restart(id) {     set_task(0.1, "set_stats", id) } //------------------------------------------------------------------- public MyFuncRoundStart(id) {     set_task(0.1, "set_stats", id) } //------------------------------------------------------------------- public set_stats(id) {     get_user_stats(id, gStats, gBodyhits)     new kills = get_user_frags(id)     new timesdied = get_user_deaths(id)     new frags = gStats[0]     new deaths = gStats[1]         if(!gSet[id] && frags != kills || deaths != timesdied)     {         set_user_frags(id, frags)         cs_set_user_deaths(id, deaths);         gSet[id] = true;     }     return PLUGIN_CONTINUE }

Quote:

L 03/11/2006 - 23:45:02: [AMXX] Run time error 10: native error (native "set_user_frags")
L 03/11/2006 - 23:45:02: [AMXX] [0] phpFtkpF2.sma::set_stats (line 74)
Anyone have any clue as to what I did wrong? Thanks a lot
Jordan is offline
 


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 20:22.


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