Script Land protection error

  • Fatal error occurred!
    org.luaj.vm2.LuaError: @/mnt/scripts/AreaProtection 2.0/areapro.lua:3 load /mnt/scripts/AreaProtection 2.0/listener/playerListener.lua: org.luaj.vm2.LuaError: load @/mnt/scripts/AreaProtection 2.0/listener/playerListener.lua: java.lang.NullPointerException
    at org.luaj.vm2.LuaValue.error(Unknown Source)
    at org.luaj.vm2.Globals.loadfile(Unknown Source)
    at lua.GlobalFunctions$include.call(SourceFile:108)
    at org.luaj.vm2.LuaClosure.execute(Unknown Source)
    at org.luaj.vm2.LuaClosure.call(Unknown Source)
    at lua.LuaScript.<init>(SourceFile:84)
    at lua.ScriptManager.loadScripts(SourceFile:35)
    at server.Main.c(SourceFile:509)
    at server.Main.initApplication(SourceFile:283)
    at commons.JIWApplication.initialize(SourceFile:92)
    at com.jme3.system.NullContext.initInThread(NullContext.java:86)
    at com.jme3.system.NullContext.run(NullContext.java:129)
    at java.lang.Thread.run(Thread.java:745)


    What is wrong in this or i there another one i download that is correct

  • I read the other post shows some symbol that needs to be remove though i dont see it an no clue , really had no clue it would be so difficult to do this or im looking at all wrong i dont know

  • Or it is not in the right place; it should be in /mnt/scripts/AreaProtection 2.0/listener/playerListener.lua


    Looking at the path, though: is it a remote directory mounted locally? If it is, I would try copying the whole scripts/AreaProtection 2.0 directory locally into your RW scripts directory and see if this improves the matter.

  • still having the error for land protection


    Using Nitrado Server


    in File Browser


    file Scipt


    Creating file named : AreaProtection , same as file name i downloaded


    inside the file i upload : Areapro.Lua
    config.properties
    definition.xml


    add in the 2 file : Groups and upload files into folders




    :Listener and upload files into folders


    Save Restart server and comes up ERROR



    So upon this what am i doing wrong ?

  • Maybe I am paranoid, but:


    1) Groups and listener are not "files" but folders and have to be created as such; can you confirm that you have a folder named listener and a file playerListener.Lua inside that folder?


    2) The code expects a folder named listener, with a lower case initial, not Listener with an upper case initial; it depends upon the OS under which the server is running, but file name matching can be case-sensitive.

  • ok i tried forward back wards lowercase uppercase still error


    Fatal error occurred!
    org.luaj.vm2.LuaError: @/mnt/scripts/areaprotection/areapro.lua:406 vm error: java.lang.NullPointerException
    at org.luaj.vm2.lib.jse.JavaMethod.invokeMethod(Unknown Source)
    at org.luaj.vm2.lib.jse.JavaMethod.call(Unknown Source)
    at org.luaj.vm2.LuaClosure.execute(Unknown Source)
    at org.luaj.vm2.LuaClosure.call(Unknown Source)
    at org.luaj.vm2.LuaClosure.execute(Unknown Source)
    at org.luaj.vm2.LuaClosure.onInvoke(Unknown Source)
    at org.luaj.vm2.LuaClosure.invoke(Unknown Source)
    at org.luaj.vm2.LuaValue.invoke(Unknown Source)
    at lua.LuaScript.enable(SourceFile:90)
    at lua.LuaScript.<init>(SourceFile:85)
    at lua.ScriptManager.loadScripts(SourceFile:35)
    at server.Main.c(SourceFile:509)
    at server.Main.initApplication(SourceFile:283)
    at commons.JIWApplication.initialize(SourceFile:92)
    at com.jme3.system.NullContext.initInThread(NullContext.java:86)
    at com.jme3.system.NullContext.run(NullContext.java:129)
    at java.lang.Thread.run(Thread.java:745)
    Caused by: java.lang.NullPointerException
    at commons.util.Utils$StringUtils.explode(SourceFile:1641)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    ... 17 more
    java.lang.NullPointerException
    at commons.util.Utils$StringUtils.explode(SourceFile:1641)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.luaj.vm2.lib.jse.JavaMethod.invokeMethod(Unknown Source)
    at org.luaj.vm2.lib.jse.JavaMethod.call(Unknown Source)
    at org.luaj.vm2.LuaClosure.execute(Unknown Source)
    at org.luaj.vm2.LuaClosure.call(Unknown Source)
    at org.luaj.vm2.LuaClosure.execute(Unknown Source)
    at org.luaj.vm2.LuaClosure.onInvoke(Unknown Source)
    at org.luaj.vm2.LuaClosure.invoke(Unknown Source)
    at org.luaj.vm2.LuaValue.invoke(Unknown Source)
    at lua.LuaScript.enable(SourceFile:90)
    at lua.LuaScript.<init>(SourceFile:85)
    at lua.ScriptManager.loadScripts(SourceFile:35)
    at server.Main.c(SourceFile:509)
    at server.Main.initApplication(SourceFile:283)
    at commons.JIWApplication.initialize(SourceFile:92)
    at com.jme3.system.NullContext.initInThread(NullContext.java:86)
    at com.jme3.system.NullContext.run(NullContext.java:129)
    at java.lang.Thread.run(Thread.java:745)



    should this be put inside admin-tool-master folder ?


    currently I am making a new folder under script folder which sits below, admin-tool-master naming the folder areaprotection just like the downloaded zip has its name when unzipped

  • Ok so where your server is, the whole folder structure should look like this.


    • cache
    • lib
    • Logs
    • permissions
    • scripts

      • admin-tools-master
      • AreaProtection

        • Groups
        • listener

          • commandListener.lua
          • playerListener.lua


        • areapro.lua
        • config.properties
        • definition.xml


    • Worlds
    • server.jar
    • server.properties

    So just copy everything from the AreaProtection2.0 zip file (after unzipping it) and put the main AP folder as i have demonstrated above into your server.

  • I followed exactly in that folder s like that an this is what i get


    Fatal error occurred!
    org.luaj.vm2.LuaError: @/mnt/scripts/AreaProtection/areapro.lua:406 vm error: java.lang.NullPointerException
    at org.luaj.vm2.lib.jse.JavaMethod.invokeMethod(Unknown Source)
    at org.luaj.vm2.lib.jse.JavaMethod.call(Unknown Source)
    at org.luaj.vm2.LuaClosure.execute(Unknown Source)
    at org.luaj.vm2.LuaClosure.call(Unknown Source)
    at org.luaj.vm2.LuaClosure.execute(Unknown Source)
    at org.luaj.vm2.LuaClosure.onInvoke(Unknown Source)
    at org.luaj.vm2.LuaClosure.invoke(Unknown Source)
    at org.luaj.vm2.LuaValue.invoke(Unknown Source)
    at lua.LuaScript.enable(SourceFile:90)
    at lua.LuaScript.<init>(SourceFile:85)
    at lua.ScriptManager.loadScripts(SourceFile:35)
    at server.Main.c(SourceFile:509)
    at server.Main.initApplication(SourceFile:283)
    at commons.JIWApplication.initialize(SourceFile:92)
    at com.jme3.system.NullContext.initInThread(NullContext.java:86)
    at com.jme3.system.NullContext.run(NullContext.java:129)
    at java.lang.Thread.run(Thread.java:745)
    Caused by: java.lang.NullPointerException
    at commons.util.Utils$StringUtils.explode(SourceFile:1641)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    ... 17 more
    java.lang.NullPointerException
    at commons.util.Utils$StringUtils.explode(SourceFile:1641)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.luaj.vm2.lib.jse.JavaMethod.invokeMethod(Unknown Source)
    at org.luaj.vm2.lib.jse.JavaMethod.call(Unknown Source)
    at org.luaj.vm2.LuaClosure.execute(Unknown Source)
    at org.luaj.vm2.LuaClosure.call(Unknown Source)
    at org.luaj.vm2.LuaClosure.execute(Unknown Source)
    at org.luaj.vm2.LuaClosure.onInvoke(Unknown Source)
    at org.luaj.vm2.LuaClosure.invoke(Unknown Source)
    at org.luaj.vm2.LuaValue.invoke(Unknown Source)
    at lua.LuaScript.enable(SourceFile:90)
    at lua.LuaScript.<init>(SourceFile:85)
    at lua.ScriptManager.loadScripts(SourceFile:35)
    at server.Main.c(SourceFile:509)
    at server.Main.initApplication(SourceFile:283)
    at commons.JIWApplication.initialize(SourceFile:92)
    at com.jme3.system.NullContext.initInThread(NullContext.java:86)
    at com.jme3.system.NullContext.run(NullContext.java:129)
    at java.lang.Thread.run(Thread.java:745)

  • Which is already several steps further, as the script no longer complains about not finding listener/playerListener.lua.


    Assuming your copy is the same which can be downloaded from the LUA scripting sub-forum, apparently one or another of the Groups/*.group files has a malformed ObjectsPlaceFilter property.

  • is there a better copy of the down load do i have a bugged copy ?


    can you show link to a areaprotection download , i can try to down load maybe better copy idk

  • Thanks for all your help but still not working im just let the server thing go , i was just trying to be an admin an play with the land an stuff but cant protect any thing so i give up

  • Thanks for all your help but still not working im just let the server thing go , i was just trying to be an admin an play with the land an stuff but cant protect any thing so i give up

    sorry im late but did you set your folder permissions to wright oO there is a database file that needs to be written too so if folders are not set you will get errors

    Yahgiggle Steam Signature, real name Deon Hamilton :thumbsup: Server @ ip 139.99.136.76:4255 Name (The Federation of territory) Unity :thumbsup:

    If at first your code does not work call it version 0.1 with the odd bug :thinking:

    My Own Website




    31245-logo-png

Participate now!

Don’t have an account yet? Create a new account now and be part of our community!