DonatorRank

Approved DonatorRank 1.7.1

No permission to download

PearlJ

Contributor
Contributor
Aug 14, 2014
86
17
8
34
Italy
misternerd.eu
Sounds like the plugin didn't load, I'll download Legacy and see
Plugin description works, if I type /vkit, in game chat appears "Usage: /vkit [basic / advanced]" but if I try to use /vkit basic, nothing happens.
Also with other commands is the same.

info, vadd, vdel etc.. works well.
 

Jakkee

Retired Staff
Retired Staff
Plugin Developer
Jul 28, 2014
1,465
932
113
Australia
Plugin description works, if I type /vkit, in game chat appears "Usage: /vkit [basic / advanced]" but if I try to use /vkit basic, nothing happens.
Also with other commands is the same.

info, vadd, vdel etc.. works well.
Line: 148 SETTINGS.clear()
needs to be PSettings.clear()
Thats a quick fix, I'll do a update later
 
  • Like
Reactions: PearlJ

PearlJ

Contributor
Contributor
Aug 14, 2014
86
17
8
34
Italy
misternerd.eu
Line: 148 SETTINGS.clear()
needs to be PSettings.clear()
Thats a quick fix, I'll do a update later
I edited it.
Now vtp, dtp and vkit basic work well, but I have always same problems with vkit advanced, dkit basic and dkit advanced (I didn't try mtp and mkit).
Also tags and maxhomes settings don't work, and when I type /dtp only one location appears (Small Rad).
 

Jakkee

Retired Staff
Retired Staff
Plugin Developer
Jul 28, 2014
1,465
932
113
Australia
I edited it.
Now vtp, dtp and vkit basic work well, but I have always same problems with vkit advanced, dkit basic and dkit advanced (I didn't try mtp and mkit).
Also tags and maxhomes settings don't work, and when I type /dtp only one location appears (Small Rad).
When I was editing the code (Changing that one line) I decided to finally change from DataStore to Dictionary. Dictionary will hold all the temp items, E.G Kits, TP locations, User Perms etc.
DataStore will now hold data that is needed over a restart (Cooldowns).
Hopefully a lot of these Teleport/Kit problems are no more!
 

PearlJ

Contributor
Contributor
Aug 14, 2014
86
17
8
34
Italy
misternerd.eu
Mm now nothing seems to work, also vkit basic and vtp/dtp.
Another thing, when players join in the server I have this:
Code:
[4/4/2016 12:11:07 PM] [Console] DonatorRank: Failed to add joining user's info into DataStore
 

Jakkee

Retired Staff
Retired Staff
Plugin Developer
Jul 28, 2014
1,465
932
113
Australia
Mm now nothing seems to work, also vkit basic and vtp/dtp.
Another thing, when players join in the server I have this:
Code:
[4/4/2016 12:11:07 PM] [Console] DonatorRank: Failed to add joining user's info into DataStore
Left out some code in 1.6 for Vkit Advanced / Dkit Basic and Dkit Advanced, Now fixed.
Also forgot to test a non admin joining the server in 1.6 (This also broke the DataStore between HomeSystem and DonatorRank), Now also fixed :)
 

tarynkelley

Retired Staff
Retired Staff
Trusted Member
Nov 14, 2015
575
178
28
Parts Unknown
I'm getting this message all the time since 1.6.2

DonatorRank: Failed to add joining user's info into DataStore

It only happens to new added VIPs

"DataStore.Add("MaxHomes", Player.SteamID, int(UserPerms[Player.SteamID + ":" + "MaxHomes"]))"

Is this line correct?
 
Last edited:

tarynkelley

Retired Staff
Retired Staff
Trusted Member
Nov 14, 2015
575
178
28
Parts Unknown
I'm getting this error with the latest version:

[IronPython] Error in plugin DonatorRank:
Traceback (most recent call last):
File "<string>", line 922, in On_PlayerConnected
File "<string>", line 908, in AddData
KeyError: HomeCoolDown

I did some logging and somehow during AddData this error is being produced:

Error: Invalid integer literal


DataStore.Add("DonatorRank-MaxHomes", Player.SteamID, int(UserPerms[Player.SteamID + ":" + "MaxHomes"])) -- Produces actually the Error: Invalid integer literal

This is probably because int(UserPerms[Player.SteamID + ":" + "MaxHomes"]) does not produce a string or does not exist.

This is actually because
ds.Get("DonatorRank", "DonatorHomesMax"))

this datastore entry does not exist.

It has to be:

users.AddSetting(donname.SteamID, "MaxHomes", PSettings["DonatorHomesMax"])

Also:

DataStore.Add("DonatorRank-Cooldown", Player.SteamID, PSettings["HomeCooldown"])

Fixed version attached
 

Attachments

Last edited:

Anaman ︻芫═───

New Member
Member
Feb 16, 2016
19
-1
1
28
Germany
[7/13/2016 11:21:55 AM] [Exception] [ IPModule->LoadPlugin | IPModule->LoadPlugins | IPModule->ReloadPlugins | IPModule->Initialize | ModuleContainer->Initialize | ModuleManager->LoadModules | Bootstrap->Start | ]
Microsoft.Scripting.SyntaxErrorException: unexpected token 'elif'
at Microsoft.Scripting.ErrorSink.Add (Microsoft.Scripting.SourceUnit source, System.String message, SourceSpan span, Int32 errorCode, Severity severity) [0x00000] in <filename unknown>:0
at IronPython.Compiler.Parser.ReportSyntaxError (Int32 start, Int32 end, System.String message, Int32 errorCode) [0x00000] in <filename unknown>:0
at IronPython.Compiler.Parser.ReportSyntaxError (IronPython.Compiler.Token t, IndexSpan span, Int32 errorCode, Boolean allowIncomplete) [0x00000] in <filename unknown>:0
at IronPython.Compiler.Parser.ParsePrimary () [0x00000] in <filename unknown>:0
at IronPython.Compiler.Parser.ParsePower () [0x00000] in <filename unknown>:0
at IronPython.Compiler.Parser.ParseFactor () [0x00000] in <filename unknown>:0
at IronPython.Compiler.Parser.ParseExpr (Int32 precedence) [0x00000] in <filename unknown>:0
at IronPython.Compiler.Parser.ParseExpr () [0x00000] in <filename unknown>:0
at IronPython.Compiler.Parser.ParseComparison () [0x00000] in <filename unknown>:0
at IronPython.Compiler.Parser.ParseNotTest () [0x00000] in <filename unknown>:0
at IronPython.Compiler.Parser.ParseAndTest () [0x00000] in <filename unknown>:0
at IronPython.Compiler.Parser.ParseOrTest () [0x00000] in <filename unknown>:0
at IronPython.Compiler.Parser.ParseExpression () [0x00000] in <filename unknown>:0
at IronPython.Compiler.Parser.ParseTestListAsExpr () [0x00000] in <filename unknown>:0
at IronPython.Compiler.Parser.ParseExprStmt () [0x00000] in <filename unknown>:0
at IronPython.Compiler.Parser.ParseSmallStmt () [0x00000] in <filename unknown>:0
at IronPython.Compiler.Parser.ParseSimpleStmt () [0x00000] in <filename unknown>:0
at IronPython.Compiler.Parser.ParseStmt () [0x00000] in <filename unknown>:0
at IronPython.Compiler.Parser.ParseSuite () [0x00000] in <filename unknown>:0
at IronPython.Compiler.Parser.ParseClassOrFuncBody () [0x00000] in <filename unknown>:0
at IronPython.Compiler.Parser.ParseFuncDef () [0x00000] in <filename unknown>:0
at IronPython.Compiler.Parser.ParseStmt () [0x00000] in <filename unknown>:0
at IronPython.Compiler.Parser.ParseSuite () [0x00000] in <filename unknown>:0
at IronPython.Compiler.Parser.ParseClassOrFuncBody () [0x00000] in <filename unknown>:0
at IronPython.Compiler.Parser.ParseClassDef () [0x00000] in <filename unknown>:0
at IronPython.Compiler.Parser.ParseStmt () [0x00000] in <filename unknown>:0
at IronPython.Compiler.Parser.ParseFileWorker (Boolean makeModule, Boolean returnValue) [0x00000] in <filename unknown>:0
at IronPython.Compiler.Parser.ParseFile (Boolean makeModule, Boolean returnValue) [0x00000] in <filename unknown>:0
at IronPython.Runtime.PythonContext.ParseAndBindAst (Microsoft.Scripting.Runtime.CompilerContext context) [0x00000] in <filename unknown>:0
at IronPython.Runtime.PythonContext.CompilePythonCode (Microsoft.Scripting.SourceUnit sourceUnit, Microsoft.Scripting.CompilerOptions options, Microsoft.Scripting.ErrorSink errorSink) [0x00000] in <filename unknown>:0
at IronPython.Runtime.PythonContext.CompileSourceCode (Microsoft.Scripting.SourceUnit sourceUnit, Microsoft.Scripting.CompilerOptions options, Microsoft.Scripting.ErrorSink errorSink) [0x00000] in <filename unknown>:0
at Microsoft.Scripting.SourceUnit.Compile (Microsoft.Scripting.CompilerOptions options, Microsoft.Scripting.ErrorSink errorSink) [0x00000] in <filename unknown>:0
at Microsoft.Scripting.SourceUnit.Execute (Microsoft.Scripting.Runtime.Scope scope, Microsoft.Scripting.ErrorSink errorSink) [0x00000] in <filename unknown>:0
at Microsoft.Scripting.SourceUnit.Execute (Microsoft.Scripting.Runtime.Scope scope) [0x00000] in <filename unknown>:0
at Microsoft.Scripting.Hosting.ScriptSource.Execute (Microsoft.Scripting.Hosting.ScriptScope scope) [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) Microsoft.Scripting.Hosting.ScriptSource:Execute (Microsoft.Scripting.Hosting.ScriptScope)
at Microsoft.Scripting.Hosting.ScriptEngine.Execute (System.String expression, Microsoft.Scripting.Hosting.ScriptScope scope) [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) Microsoft.Scripting.Hosting.ScriptEngine:Execute (string,Microsoft.Scripting.Hosting.ScriptScope)
at IronPythonModule.IPPlugin..ctor (System.String name, System.String code, System.IO.DirectoryInfo path) [0x00000] in <filename unknown>:0
at IronPythonModule.IPModule.LoadPlugin (System.String name) [0x00000] in <filename unknown>:0
 

tarynkelley

Retired Staff
Retired Staff
Trusted Member
Nov 14, 2015
575
178
28
Parts Unknown
If they have 4 days in cooldown then you need to flush the database of DonatorRank and reload the plugin with python.reload console command.

I myself never had that problem.

Python:
# -*- coding: utf-8 -*-
__title__ = 'DonatorFlush'
__author__ = 'tarynkelley'
__version__ = '0.1'
import clr
clr.AddReferenceByPartialName("Fougerite")
import System
import Fougerite

class DonatorFlush:

    def On_PluginInit(self):
        Util.ConsoleLog(__title__ + " by " + __author__ + " Version: " + __version__ + " loaded.", False)

    def On_Command(self, Player, cmd, args):
        if cmd == "donatorflush":
            if Player.Admin:
                            DataStore.Flush("LVL1VKitCooldown")
                            DataStore.Flush("LVL2VKitCooldown")
                            DataStore.Flush("LVL1DKitCooldown")
                            DataStore.Flush("LVL2DKitCooldown")
                            DataStore.Flush("VTPCooldown")
                            DataStore.Flush("DTPCooldown")
                            DataStore.Flush("DonatorRank")
                            Player.MessageFrom("DonatorFlush", "DonatorRank CooldownDB flushed!")
            else:
                 Player.MessageFrom("DonatorFlush", "No permissions")