1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Approved BuildingRestriction 1.0.3

Limits the amount of foundations and height of a base

  1. Jakkee
    Offline

    Jakkee Plugin Developer Plugin Developer Contributor

    Joined:
    Jul 28, 2014
    Messages:
    1,466
    Likes Received:
    149
    Jakkee submitted a new resource:

    BuildingRestriction - Limits the amount of foundations and height of a base

    Read more about this resource...
     
    #1
  2. maughanorama
    Offline

    maughanorama Member Member

    Joined:
    Nov 27, 2014
    Messages:
    181
    Likes Received:
    6
    cool addon .. i cnt get it to work and i seem to be getting this

    NullReferenceException: Object reference not set to an instance of an object
    NullReferenceException: Object reference not set to an instance of an object
    at IronPython.Runtime.Operations.PythonOps.MakeString (System.Collections.Generic.IList`1<byte>) <0x0000f>
    at IronPython.Runtime.Operations.DoubleOps.__new__ (IronPython.Runtime.CodeContext,IronPython.Runtime.Types.PythonType,System.Collections.Generic.IList`1<byte>) <0x000b3>
    at (wrapper dynamic-method) object.CallSite.Target (System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,IronPython.Runtime.CodeContext,object,object) <0x00100>
    at System.Dynamic.UpdateDelegates.UpdateAndExecute3<IronPython.Runtime.CodeContext, object, object, object> (System.Runtime.CompilerServices.CallSite,IronPython.Runtime.CodeContext,object,object) <0x003a4>
    at (wrapper delegate-invoke) Microsoft.Scripting.Utils.Func`6<System.Func`5<System.Runtime.CompilerServices.CallSite, IronPython.Runtime.CodeContext, object, object, object>, System.Runtime.CompilerServices.CallSite, IronPython.Runtime.CodeContext, object, object, object>.invoke_object__this___Func`5<CallSite, CodeContext, object, object, object>_CallSite_CodeContext_object_object (System.Func`5<System.Runtime.CompilerServices.CallSite, IronPython.Runtime.CodeContext, object, object, object>,System.Runtime.CompilerServices.CallSite,IronPython.Runtime.CodeContext,object,object) <0x0006c>
    at Microsoft.Scripting.Interpreter.FuncCallInstruction`6<System.Func`5<System.Runtime.CompilerServices.CallSite, IronPython.Runtime.CodeContext, object, object, object>, System.Runtime.CompilerServices.CallSite, IronPython.Runtime.CodeContext, object, object, object>.Run (Microsoft.Scripting.Interpreter.InterpretedFrame) <0x00181>
    at Microsoft.Scripting.Interpreter.Interpreter.Run (Microsoft.Scripting.Interpreter.InterpretedFrame) <0x0007a>

    UnityEngine.Debug:Internal_LogException(Exception, Object)
    UnityEngine.Debug:LogException(Exception, Object)
    Fougerite.Logger:LogException(Exception, Object)
    IronPythonModule.IPPlugin:Invoke(String, Object[])
    IronPythonModule.IPPlugin:OnEntityDeployed(Player, Entity)
    Fougerite.Hooks:EntityDeployed(Object)
    StructureComponentDataBlock:DoAction1(BitStream, ItemRepresentation, NetworkMessageInfo&)
    ItemRepresentation:RunAction(Int32, BitStream, NetworkMessageInfo&)
    ItemRepresentation:RunServerAction(Int32, BitStream, NetworkMessageInfo&)
    ItemRepresentation:Action1(BitStream, NetworkMessageInfo)
    System.Reflection.MonoMethod:InternalInvoke(Object, Object[], Exception&)
    System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo)
    System.Reflection.MethodBase:Invoke(Object, Object[])
    #=qaL2AMBCaBLCj4lGSCwjcBVYUs_5vzeQVgu44HVklVYQ=:#=qG_E6hqIvz6NLWQQCT2N5IA==(Object, Object[])
    #=q$NUWz6aT_ypN3cz7K6ce2gVWapiYAlnLPGzKjIUfT2w=:#=qS9ntZNSJqwnPkZv_HZvsug==(BitStream, Object)
    uLink.NetworkView:OnRPC(String, BitStream, NetworkMessageInfo)
    uLink.NetworkViewBase:#=qpJfiNEhSKsosBj54zW21Bw==(String, BitStream, NetworkMessageInfo)
    #=qjg$mq9k6hZwR1eaAS3eQ4dux$3oD_j8CRZte$f$nFV0=:#=qlGEZiB55BOeKhe33IbTgs3lVmx7rHXWsIFfTvKtNlrQ=(#=q__0aJnzE_j5V$E$xqdkd8PUPKgwbochaYTDqzGbXfa0=)
    #=qjg$mq9k6hZwR1eaAS3eQ4dux$3oD_j8CRZte$f$nFV0=:#=qIPn628V9gmXGKu9CDwAT4Q==(#=q__0aJnzE_j5V$E$xqdkd8PUPKgwbochaYTDqzGbXfa0=)
    #=qxj6gmeF_JmZ38rfyBJuqFoiB_sAo6WCf4j1AdQtxGgQ=:#=qpnen9BDYWb7GIHNeIDM0B2w3_bWY6Y1K7n6fbysAk2U=(#=q__0aJnzE_j5V$E$xqdkd8PUPKgwbochaYTDqzGbXfa0=)
    #=qxj6gmeF_JmZ38rfyBJuqFoiB_sAo6WCf4j1AdQtxGgQ=:#=qnjPTIXsYLyWun9DHM4QyDdSqTLT$sNaH7rGgebuLUF8=(#=qDyYck6jY0p_qh6doTcsvIbN8t3TKJHLMicx6djrzRdg=, #=qRMLBZ3x0t2lxzonCDm0Cfm2prwqhhrFrdWTAeD6z7q8=, #=qBQZKBBBvB7$YPJYYJ6uGmZupKsyCo6fust8CQG8ZrYc=)
    #=qxj6gmeF_JmZ38rfyBJuqFoiB_sAo6WCf4j1AdQtxGgQ=:#=q9Ox7MeTma6fxAsTig99GV6twoS8KYKSkq98q3ldn1AU=()
    #=qxj6gmeF_JmZ38rfyBJuqFoiB_sAo6WCf4j1AdQtxGgQ=:#=qdSwDnRo$f5EQslih94YkOg==()
    #=qjg$mq9k6hZwR1eaAS3eQ4dux$3oD_j8CRZte$f$nFV0=:#=qqJfJJIU5OocEzCry9eP0ew==()
    #=qSBVG6i3HoKQx$z3bwADYIgVX_kCktQP8JwBh1CI$O_8=:#=qK4rBLHQlJi1c$9ISNO6Z6w==()
    uLink.InternalHelper:LateUpdate()

    (Filename: Line: -1)
     
    #2
  3. Jakkee
    Offline

    Jakkee Plugin Developer Plugin Developer Contributor

    Joined:
    Jul 28, 2014
    Messages:
    1,466
    Likes Received:
    149
    Ignore NullReference, Also does the plugin work while getting that big o' error?
     
    #3
  4. maughanorama
    Offline

    maughanorama Member Member

    Joined:
    Nov 27, 2014
    Messages:
    181
    Likes Received:
    6
    Na I'm unable to get it to work.... I'm out at the mo Ill ttry again in a bit from fresh reload
     
    #4
  5. Jakkee
    Offline

    Jakkee Plugin Developer Plugin Developer Contributor

    Joined:
    Jul 28, 2014
    Messages:
    1,466
    Likes Received:
    149
    I'll have a play around see if i can get that error, Do you know how you got it?
    I know NullReference is when destroying an object
     
    #5
  6. Jakkee
    Offline

    Jakkee Plugin Developer Plugin Developer Contributor

    Joined:
    Jul 28, 2014
    Messages:
    1,466
    Likes Received:
    149
    #6
  7. ammaz
    Offline

    ammaz Member Member

    Joined:
    Jan 16, 2015
    Messages:
    40
    Likes Received:
    2
    I am getting this error.
    Error in plugin BuildingRestriction:
    Traceback (most recent call last):
    File "<string>", line 78, in On_EntityDeployed
    TypeError: Multiple targets could match: int(type, IList[Byte]), int(type, objec
    t), int(type, Extensible[float])

    Error in plugin BuildingRestriction:
    Traceback (most recent call last):
    File "<string>", line 58, in On_EntityDeployed
    TypeError: Multiple targets could match: int(type, IList[Byte]), int(type, objec
    t), int(type, Extensible[float])
     
    #7
  8. Jakkee
    Offline

    Jakkee Plugin Developer Plugin Developer Contributor

    Joined:
    Jul 28, 2014
    Messages:
    1,466
    Likes Received:
    149
    #8
  9. Leonardo
    Offline

    Leonardo New Member Member

    Joined:
    Sep 5, 2015
    Messages:
    20
    Likes Received:
    1
    Hey, You could add the next updates a limit of objects that can be placed by each player?
     
    #9
    • Informative Informative x 1
  10. tarynkelley
    Offline

    tarynkelley Moderator Moderator

    Joined:
    Nov 14, 2015
    Messages:
    559
    Likes Received:
    36
    Is it possible to make building restrictions only for specific areas?
     
    #10
  11. LaIkIuX 2
    Offline

    LaIkIuX 2 Member Member

    Joined:
    Dec 26, 2016
    Messages:
    35
    Likes Received:
    0
    What is wrong with height base limit after player disconect other friend can build unlimit height base?
    Server has DestroySystem plugin, rust++ module
     
    #11
    Last edited: Jan 7, 2017
  12. Jakkee
    Offline

    Jakkee Plugin Developer Plugin Developer Contributor

    Joined:
    Jul 28, 2014
    Messages:
    1,466
    Likes Received:
    149
    Plugin doesn't check player/s. Can't see why that would happen.
    On each placement it will check if it is within the max height and/or max foundations
     
    #12
  13. gintaras
    Offline

    gintaras Plugin Developer Plugin Developer Wiki Editor

    Joined:
    Jan 10, 2017
    Messages:
    69
    Likes Received:
    8
    Yeap this is bug when player is offline there no where to sendback piller or fundation
     
    #13
  14. gintaras
    Offline

    gintaras Plugin Developer Plugin Developer Wiki Editor

    Joined:
    Jan 10, 2017
    Messages:
    69
    Likes Received:
    8
    if height < Entity.Y - ent.Y:
    try:
    Player.Inventory.AddItem("Wood Pillar", 1)
    Player.InventoryNotice("1 x " + Entity.Name)
    Entity.Destroy()
    Player.Message("Max build height reached for this base [ " + str(PluginSettings["Max WoodHeight"] / 4) + " units tall ]")
    except:
    break
    break
    else:
    continue

    its try player.inv but structure dont belong to player who builds so its get to exception
    I dont programing in PY but this may help to fix

    try:
    Player.Inventory.AddItem("Wood Pillar", 1)
    Player.InventoryNotice("1 x " + Entity.Name)
    Entity.Destroy()
    Player.Message("Max build height reached for this base [ " + str(PluginSettings["Max WoodHeight"] / 4) + " units tall ]")
    except:
    Entity.Destroy()
    break
    break
     
    #14
  15. Jakkee
    Offline

    Jakkee Plugin Developer Plugin Developer Contributor

    Joined:
    Jul 28, 2014
    Messages:
    1,466
    Likes Received:
    149
    Are you logged in as an Admin OR Moderator and placing objects?
     
    #15
  16. DreTaX
    Online

    DreTaX Probably knows the answer... Administrator

    Joined:
    Jun 29, 2014
    Messages:
    3,886
    Likes Received:
    685
    Change:
    def On_EntityDeployed(self, Player, Entity):

    To:
    def On_EntityDeployed(self,Player,Entity, ActualPlacer):

    Use ActualPlacer instead of Player
     
    #16
  17. Jakkee
    Offline

    Jakkee Plugin Developer Plugin Developer Contributor

    Joined:
    Jul 28, 2014
    Messages:
    1,466
    Likes Received:
    149
    RIP... :D
     
    #17
  18. Jakkee
    Offline

    Jakkee Plugin Developer Plugin Developer Contributor

    Joined:
    Jul 28, 2014
    Messages:
    1,466
    Likes Received:
    149
    #18
    • Like Like x 1
  19. salva
    Offline

    salva Friendly self-taught developer Administrator

    Joined:
    Jan 31, 2016
    Messages:
    609
    Likes Received:
    105
    1.0.3

    [IronPython] Error in plugin BuildingRestriction:
    Traceback (most recent call last):
    File "<string>", line 106, in On_EntityDeployed
     
    #19
  20. LaIkIuX 2
    Offline

    LaIkIuX 2 Member Member

    Joined:
    Dec 26, 2016
    Messages:
    35
    Likes Received:
    0
    remove old save config
     
    #20

Share This Page