1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Hey Guest, is it this your first time on the forums?

    Visit the Beginner's Box

    Introduce yourself, read some of the ins and outs of the community, access to useful links and information.

    Dismiss Notice

[Solved] Random "Null pointer access" when using a scroll error on a server

Discussion in 'Modding Help' started by Frikman, Sep 10, 2016.

  1. Frikman

    Frikman Bison Rider

    Messages:
    162
    Hi! I've been testing some changes on ZFM+ and I noticed something strange. When @kiaran used a "Scroll of Undead" they got bugged and wouldn't spawn on the next maps until I restarted the server. I checked the logs and this is the error I got
    Code:
    [21:24:51] <RCON> Script: Exception occurred while executing '../Mods/ZFM+1.6.1c/Entities/Items/Scroll/ScrollUndead.as'; Line 32 Column 3; in function: void onCommand(CBlob@, uint8, CBitStream@)
    Null pointer access
    [21:24:51] Script: Exception occurred while executing '../Mods/ZFM+1.6.1c/Entities/Items/Scroll/ScrollUndead.as'; Line 32 Column 3; in function: void onCommand(CBlob@, uint8, CBitStream@)
    Null pointer access
    What's weird is that, both times the error happened, it only happened when kiaran used it. I don't know why it bugs ._.
     

    Attached Files:

  2. kiaran

    kiaran Ballista Bolt Thrower
    1. Aphelion's Roleplay

    Messages:
    76
    i used it 2 times instead of 1 might of caused it
     
  3. makmoud98

    makmoud98 You are already DEAD Forum Moderator Staff Alumni Tester

    Messages:
    586
    this is how to properly check for null in this script.
    [​IMG]

    fixed script attached
     

    Attached Files:

    Frikman likes this.
  4. Frikman

    Frikman Bison Rider

    Messages:
    162
    Thanks! The wording's really different, I guess that's what caused the problems. It works on singleplayer but I'll test it tonight to see if other issues come around c: