Raised This Month: $ Target: $400
 0% 

Run Time Error


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Nick
Senior Member
Join Date: Apr 2004
Location: Canada, Alberta, Cal
Old 07-11-2004 , 22:09   Run Time Error
Reply With Quote #1

I get a run time error in this code.
Code:
public slap_player(ids[],tslap) {     new id = ids[0]     new origin[3], name[32]             get_user_name(tslap,name,31)         get_user_origin(tslap,origin)         bloodeffects(origin)     new slapdmg = get_cvar_num("sv_slappower")     user_slap(id,slapdmg)     return PLUGIN_CONTINUE }
I get the runtime on
Code:
get_user_origin(tslap,origin)
why is this??
__________________
Nick is offline
Send a message via MSN to Nick
Burnzy
Veteran Member
Join Date: Apr 2004
Old 07-11-2004 , 22:10  
Reply With Quote #2

are u running fun module?
__________________
Burnzy is offline
Send a message via AIM to Burnzy
Nick
Senior Member
Join Date: Apr 2004
Location: Canada, Alberta, Cal
Old 07-11-2004 , 22:11  
Reply With Quote #3

why do i need fun module?
__________________
Nick is offline
Send a message via MSN to Nick
Burnzy
Veteran Member
Join Date: Apr 2004
Old 07-11-2004 , 22:24  
Reply With Quote #4

oops, i thought origin was with fun module... nvm what i said
__________________
Burnzy is offline
Send a message via AIM to Burnzy
Nick
Senior Member
Join Date: Apr 2004
Location: Canada, Alberta, Cal
Old 07-11-2004 , 22:25  
Reply With Quote #5

its k, got any ideas?
__________________
Nick is offline
Send a message via MSN to Nick
jtp10181
Veteran Member
Join Date: May 2004
Location: Madison, WI
Old 07-11-2004 , 22:30  
Reply With Quote #6

tell me the exact error and I can help. the runtime error number is useful

http://www.ravenousbugblatterbeast.p...debug-amx.html
__________________
jtp10181 is offline
Send a message via ICQ to jtp10181 Send a message via AIM to jtp10181 Send a message via MSN to jtp10181 Send a message via Yahoo to jtp10181
Nick
Senior Member
Join Date: Apr 2004
Location: Canada, Alberta, Cal
Old 07-11-2004 , 22:32  
Reply With Quote #7

Code:
L 07/11/2004 - 18:55:18: [AMXX] Run time error 10 on line 166 (task "0")
line 166 is

Code:
get_user_origin(tslap,origin)
__________________
Nick is offline
Send a message via MSN to Nick
Burnzy
Veteran Member
Join Date: Apr 2004
Old 07-11-2004 , 22:37  
Reply With Quote #8

Quote:
10 - AMX_ERR_NATIVE
This means an error has occurred inside a native function provided by Admin Mod. Usually this is because you have passed it invalid values in its arguments. There is one known way to generate this error when your arguments are valid; call the readfile() function and attempt to read a line that is too long for the buffer you are providing to receive it.
__________________
Burnzy is offline
Send a message via AIM to Burnzy
Nick
Senior Member
Join Date: Apr 2004
Location: Canada, Alberta, Cal
Old 07-11-2004 , 22:41  
Reply With Quote #9

k, thx I'll try some things
__________________
Nick is offline
Send a message via MSN to Nick
jtp10181
Veteran Member
Join Date: May 2004
Location: Madison, WI
Old 07-11-2004 , 23:08  
Reply With Quote #10

usually I get that error on the get_user_origin is the plugin has the chance of passing an invalid or null userid to the function, just do a check on the iserid before it gets passed to the origin function
__________________
jtp10181 is offline
Send a message via ICQ to jtp10181 Send a message via AIM to jtp10181 Send a message via MSN to jtp10181 Send a message via Yahoo to jtp10181
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 14:49.


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