IPB

Welcome Guest ( Log In | Register )

2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 
Reply to this topicStart new topic
> Plugin settings get lost
dyolf
post Sep 29 2009, 12:45 PM
Post #1


Jr. Member
**

Group: Beta Testers
Posts: 27
Joined: 20-May 08
Member No.: 37,176



Often, plugins will "forget" their settings, and revert to defaults even though they are stored in the pluginsettings.ini

Plugins that forget their settings:
* crs
* afk

Any ideas why this happens, and what i could do to prevent it?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
The-Black-Ninja
post Sep 29 2009, 02:15 PM
Post #2


Pure Sex
********

Group: Moderators
Posts: 7,756
Joined: 13-August 06
Member No.: 7,372



Type /lset after saving your changes in the ini file.

I notice you're a beta tester; in the beta version, you don't need to do this, the changes are automatically saved in the settings.ini file, which is your new pluginsettings.ini, so all the changes you make should be in the settings.ini.


--------------------
IPB Image

-My Plugins :: Thanks Pyro :)
IPB ImageIPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
dyolf
post Oct 1 2009, 12:14 AM
Post #3


Jr. Member
**

Group: Beta Testers
Posts: 27
Joined: 20-May 08
Member No.: 37,176



The problem happens not when i manually edit the pluginsettings.ini file, but when i close the bot, reboot and restart it. For example, the clan ranking script will ask again for the channel name etc. It does not happen every time, so perhaps one of the scripts is killing the ini file on startup? I will try with minimal installed plugins.

This post has been edited by dyolf: Oct 1 2009, 12:15 AM
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
AwaKening
post Oct 4 2009, 06:46 PM
Post #4


Don't u know who I am
***

Group: Sr. Members
Posts: 764
Joined: 19-February 06
From: Utah
Member No.: 275



There was a bug in the old pluginsystem.dat file that causes this. I fixed it in my own at one time, but it's easier now to just redownload the newest beta and it's fixed.


--------------------
Rival Nations Reborn Map Creator

Clan RnR.com
If you're looking for a "REAL" dota league script, aim or pm me.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
The-Black-Ninja
post Oct 4 2009, 07:23 PM
Post #5


Pure Sex
********

Group: Moderators
Posts: 7,756
Joined: 13-August 06
Member No.: 7,372



Ffs, people need to stop posting questions in this forum and NOT the beta forum. By posting your question here and not saying you're specifically using the beta, it leads me to believe you have a question about your 2.6 bot.


--------------------
IPB Image

-My Plugins :: Thanks Pyro :)
IPB ImageIPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
dyolf
post Oct 5 2009, 09:37 AM
Post #6


Jr. Member
**

Group: Beta Testers
Posts: 27
Joined: 20-May 08
Member No.: 37,176



Relax, this is not a question about the beta version of the bot, but about 2.6 ffs wink.gif

So, any idea why this happens in version 2.6 Revision 3?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
The-Black-Ninja
post Oct 5 2009, 04:13 PM
Post #7


Pure Sex
********

Group: Moderators
Posts: 7,756
Joined: 13-August 06
Member No.: 7,372



It shouldn't be happening in 2.6R3, that is to say, I've never had this happen before. Try turning all your plugins off, make a mental note of what settings keep changing, then shutdown/restart and see if things have changed. If not, it's a plugin that's resetting everything. Be sure you have the latest PluginSystem.dat file.


--------------------
IPB Image

-My Plugins :: Thanks Pyro :)
IPB ImageIPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
AwaKening
post Oct 5 2009, 09:52 PM
Post #8


Don't u know who I am
***

Group: Sr. Members
Posts: 764
Joined: 19-February 06
From: Utah
Member No.: 275



I just said that there was a known bug that caused this in the pluginsystem for 2.6. It was never fixed because Swent at the time said just wait for 2.7. I don't have the version that I edited anymore, but this will help.

Find this sub in PluginSystem.dat in your bot folder.
CODE
Sub SetSetting(Prefix, SettingName, SettingValue, SettingDescription, Overwrite)

   settingKey = Prefix & ":" & SettingName
   If psSettings.Exists(settingKey) and Overwrite Then
      If SettingDescription = "" Then
     SettingDescription = psSettings.Item(settingKey)(1)
      End If
      psSettings.Item(settingKey) = Array(SettingValue, SettingDescription)
   ElseIf Not psSettings.Exists(settingKey) Then
      psSettings.Add settingKey, Array(SettingValue, SettingDescription)
   End If
End Sub


Add in Line
CODE
Call SaveSettings()


End result looks like this:
CODE
Sub SetSetting(Prefix, SettingName, SettingValue, SettingDescription, Overwrite)

   settingKey = Prefix & ":" & SettingName
   If psSettings.Exists(settingKey) and Overwrite Then
      If SettingDescription = "" Then
     SettingDescription = psSettings.Item(settingKey)(1)
      End If
      psSettings.Item(settingKey) = Array(SettingValue, SettingDescription)
   ElseIf Not psSettings.Exists(settingKey) Then
      psSettings.Add settingKey, Array(SettingValue, SettingDescription)
   End If
   Call SaveSettings()
End Sub


I believe I found some other problems as well, but can't remember what.

This post has been edited by AwaKening: Oct 5 2009, 09:53 PM


--------------------
Rival Nations Reborn Map Creator

Clan RnR.com
If you're looking for a "REAL" dota league script, aim or pm me.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
dyolf
post Oct 6 2009, 01:58 AM
Post #9


Jr. Member
**

Group: Beta Testers
Posts: 27
Joined: 20-May 08
Member No.: 37,176



End result looks like this:
CODE
Sub SetSetting(Prefix, SettingName, SettingValue, SettingDescription, Overwrite)

   settingKey = Prefix & ":" & SettingName
   If psSettings.Exists(settingKey) and Overwrite Then
      If SettingDescription = "" Then
     SettingDescription = psSettings.Item(settingKey)(1)
      End If
      psSettings.Item(settingKey) = Array(SettingValue, SettingDescription)
   ElseIf Not psSettings.Exists(settingKey) Then
      psSettings.Add settingKey, Array(SettingValue, SettingDescription)
   End If
   Call SaveSettings()
End Sub


Thanks a bunch, mate. Exactly what i neeeded!

Update: Added the SaveSettings as you posted, seems to work perfectly.

This post has been edited by dyolf: Oct 6 2009, 02:03 AM
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
The-Black-Ninja
post Oct 6 2009, 02:14 PM
Post #10


Pure Sex
********

Group: Moderators
Posts: 7,756
Joined: 13-August 06
Member No.: 7,372



Awakening, let nate know about this error on the new forums so he can fix it officially.


--------------------
IPB Image

-My Plugins :: Thanks Pyro :)
IPB ImageIPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 20th September 2019 - 10:29 AM
Skin by Andrea
Website Legal Information | Hosted by LunarPages