AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   invalid cvar pointer, and i cant seem to figure out why... (https://forums.alliedmods.net/showthread.php?t=30029)

diamond-optic 06-20-2006 20:30

invalid cvar pointer, and i cant seem to figure out why...
 
im getting this error

Quote:

Invalid CVAR pointer
[AMXX] Displaying debug trace (plugin "dod_wildlife.amxx")
[AMXX] Run time error 10: native error (native "get_pcvar_num")
[AMXX] [0] dod_wildlife.sma::client_putinserver (line 94)
and heres that part of the code:

Code:
new p_dod_wildlife public plugin_init() {     register_plugin("DoD Wildlife","1.0","AMXX DoD Team")         p_dod_wildlife = register_cvar("dod_wildlife","1") } public client_putinserver(id) {     if(is_user_connected(id) && get_pcvar_num(p_dod_wildlife) == 1)         {         set_task(120.0,"wildlife_check",id)         } }

now i even tried copying from another plugin i have that uses the pcvar in the putinserver without any problems, but i still get the error with this one...

any ideas?

*UPDATE*

i removed the pvcar stuff from the putinserver and i still get that error when i calls that pcvar in another spot in the code...

idk.. maybe im an idiot and ive used pcvars plenty of times.. but it seems like im using it right..

BAILOPAN 06-21-2006 01:18

just making sure - what amxmodx version?
also, could you post the rest of your code?

diamond-optic 06-21-2006 09:38

well its 1.71

but wierd stuff man.. you can lock/delete this whatever..

cuase this morning i tried it again and it worked fine, and i didnt change anything from last night when i was getting that error..

so something musta been wrong with my amxx or steam or something (i was getting that error while testing it on my local before uploading it to my ded. server)

beats the heck outta me.. but it all seems good now lol
but thanks for the reply bail


All times are GMT -4. The time now is 07:58.

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