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

[HELP] Get All Cmd Args


Post New Thread Reply   
 
Thread Tools Display Modes
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 09-13-2019 , 11:19   Re: [HELP] Get All Cmd Args
Reply With Quote #11

If you remove that else, every time the "[SM] You set your new phrase..." msg displays the next one "[SM] The phrase you entered is the same..." will be displayed either. So you shouldn't use this "clean way".
__________________
Marttt is offline
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 09-13-2019 , 11:24   Re: [HELP] Get All Cmd Args
Reply With Quote #12

To answer your first question, I had it set up that way so that the plugin would only save your phrase if it’s different from the one currently stored. With your proposed code, you’d be displaying the second message even if a player sets a completely different phrase. That’s why it’s inside an else block.

As for your second question, KV.ExportToFile() is needed if you want to overwrite the current data stored on the KV file with the new data you set in the plugin. The documentation for the function is as follows:

Exports a KeyValues tree to a file. The tree is dumped from the current position.
__________________
Psyk0tik 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 08:10.


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