Raised This Month: $51 Target: $400
 12% 

Help In My First Plugin (Alot Of Error Messages)


Post New Thread Reply   
 
Thread Tools Display Modes
GetRektByNoob
Member
Join Date: Nov 2018
Old 11-16-2018 , 15:51   Re: Help In My First Plugin (Alot Of Error Messages)
Reply With Quote #11

im almost done with my plugin but there is only one more thing...
i used this function

Code:
 SetConVarInt(weapon_recoil_scale,0,true,false);
and got this error message
Code:
error 017: undefined symbol "weapon_recoil_scale"
and i cant find out y...

Last edited by GetRektByNoob; 11-16-2018 at 15:52.
GetRektByNoob is offline
Whai
Senior Member
Join Date: Jul 2018
Old 11-16-2018 , 16:17   Re: Help In My First Plugin (Alot Of Error Messages)
Reply With Quote #12

Quote:
Originally Posted by GetRektByNoob View Post
im almost done with my plugin but there is only one more thing...
i used this function

Code:
 SetConVarInt(weapon_recoil_scale,0,true,false);
and got this error message
Code:
error 017: undefined symbol "weapon_recoil_scale"
and i cant find out y...
Quote:
Originally Posted by Whai View Post
Here is all you need :
Global New Api Reference
From this "Global New Api Reference"

You can search and find SetConVarInt Function and you'll see
Code:
SetConVarInt(Handle convar, int value, bool replicate, bool notify)
now with your
Code:
 SetConVarInt(weapon_recoil_scale,0,true,false);
Is "weapon_recoil_scale" is a handle ? No, it's the name of the ConVar

Here is how to do :

From this : Global New Api Reference

if you search a little bit, you'll find "FindConVar", it says "return to a ConVar object if found; null otherwise."
Code:
ConVar FindConVar(const char[] name)
So what you have to do is :
Code:
Handle WeaponRecoil;

public void OnPluginStart()
{
WeaponRecoil = FindConVar("weapon_recoil_scale");
}
and now you can do

Code:
SetConVarInt(WeaponRecoil ,0,true,false);
__________________

Last edited by Whai; 11-16-2018 at 16:20.
Whai is offline
GetRektByNoob
Member
Join Date: Nov 2018
Old 11-16-2018 , 17:03   Re: Help In My First Plugin (Alot Of Error Messages)
Reply With Quote #13

thank you guys sooo much!
GetRektByNoob is offline
GetRektByNoob
Member
Join Date: Nov 2018
Old 11-16-2018 , 18:20   Re: Help In My First Plugin (Alot Of Error Messages)
Reply With Quote #14

im having a wirde thing... i completed my plugin and tested it on my friend server but its not doing anything...
all the commands are not working and the only thing that is working is starting a vote but the vote only shows but dosent do anything after every one has voted...
can someone help with it?


the plugin :
SMX | SP

this is what is plugin supposed to do https://forums.alliedmods.net/showthread.php?t=311806

Last edited by GetRektByNoob; 11-16-2018 at 18:21.
GetRektByNoob is offline
Whai
Senior Member
Join Date: Jul 2018
Old 11-16-2018 , 19:48   Re: Help In My First Plugin (Alot Of Error Messages)
Reply With Quote #15

Why upload the plugin via MEGA instead of this site ?
__________________
Whai is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 11-17-2018 , 00:17   Re: Help In My First Plugin (Alot Of Error Messages)
Reply With Quote #16

What is the point of helping you if you are not listening?

Use my example, no need to count the votes.
Instead of finding out what's wrong in your code why not use correct little snippet? It is a same as in sm manual by link Whai provided you previously.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
Reply



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 09:25.


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