AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Run Time Error (https://forums.alliedmods.net/showthread.php?t=3691)

Nick 07-11-2004 22:09

Run Time Error
 
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??

Burnzy 07-11-2004 22:10

are u running fun module?

Nick 07-11-2004 22:11

why do i need fun module?

Burnzy 07-11-2004 22:24

oops, i thought origin was with fun module... nvm what i said

Nick 07-11-2004 22:25

its k, got any ideas?

jtp10181 07-11-2004 22:30

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

http://www.ravenousbugblatterbeast.p...debug-amx.html

Nick 07-11-2004 22:32

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)

Burnzy 07-11-2004 22:37

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.

Nick 07-11-2004 22:41

k, thx I'll try some things :)

jtp10181 07-11-2004 23:08

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


All times are GMT -4. The time now is 14:49.

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