Raised This Month: $32 Target: $400
 8% 

nVault plugin not working


Post New Thread Reply   
 
Thread Tools Display Modes
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 06-14-2020 , 22:43   Re: nVault plugin not working
Reply With Quote #21

It's not guaranteed that authorized is called before putinserver. I would use authorized only, using set_task() to delay the call to LoadPrefix(). Try it and see what happens.
__________________

Last edited by Bugsy; 06-14-2020 at 22:44.
Bugsy is online now
supertrio17
Senior Member
Join Date: May 2020
Location: Serbia
Old 06-14-2020 , 22:51   Re: nVault plugin not working
Reply With Quote #22

Quote:
Originally Posted by Bugsy View Post
It's not guaranteed that authorized is called before putinserver. I would use authorized only, using set_task() to delay the call to LoadPrefix(). Try it and see what happens.
My way works, but with set_task plugin looks simpler, so I ended up using set_task. Thanks man
__________________
Contact! || Discord:
Mr_Boopsy_#2066
supertrio17 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 06-15-2020 , 04:21   Re: nVault plugin not working
Reply With Quote #23

Quote:
Originally Posted by supertrio17 View Post
My way works, but with set_task plugin looks simpler, so I ended up using set_task. Thanks man
Your way appears to work now, but you are reyling on undefined behavior which is really bad. If the execution order is not guaranteed then do not make any assumptions about it and find another way. It may work fine one time and then break.
__________________
HamletEagle is offline
supertrio17
Senior Member
Join Date: May 2020
Location: Serbia
Old 06-15-2020 , 11:02   Re: nVault plugin not working
Reply With Quote #24

Thanks for your reply, I'm new so I'm trying to get how things work, I think I'm doing fine, but there is just too much to learn.
__________________
Contact! || Discord:
Mr_Boopsy_#2066
supertrio17 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 06-15-2020 , 11:04   Re: nVault plugin not working
Reply With Quote #25

You don't have to learn or understand everything in one day or one week, there's no time limit. Enjoy the process of learning and discovering new things.
__________________
HamletEagle is offline
supertrio17
Senior Member
Join Date: May 2020
Location: Serbia
Old 06-15-2020 , 11:08   Re: nVault plugin not working
Reply With Quote #26

Yeah, it's really fun to learn how to pawn, But there really are not enough tutorials, and you can't learn everything from them, best way to learn so far was to look at every plugin I see and to break it down to see how everything works.
__________________
Contact! || Discord:
Mr_Boopsy_#2066
supertrio17 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 06-15-2020 , 12:01   Re: nVault plugin not working
Reply With Quote #27

Quote:
Originally Posted by supertrio17 View Post
Yeah, it's really fun to learn how to pawn, But there really are not enough tutorials, and you can't learn everything from them, best way to learn so far was to look at every plugin I see and to break it down to see how everything works.
The tutorials are a starting point. As you said, the best way to learn is to set a goal(a plugin you'd like to make) and then try to discover how to make it(by looking at similar plugins, tutorials, figuring things on your own or asking here).

For more pawn related details you may want to check the pawn language guide: https://raw.githubusercontent.com/co.../pawn-lang.pdf
Note that it is not needed to read the book in order to be able to code plugins(it is about pawn, not about amxx scripting), but it can provide more details about how things work and little "features" of the language(things that may not necessarily be useful/make sense for a beginner).
__________________

Last edited by HamletEagle; 06-15-2020 at 12:02.
HamletEagle 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 22:48.


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