Navigation

    forum

    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    1. Home
    2. Cybren
    3. Posts
    • Flag Profile
    • block_user
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Groups
    • Blog

    Posts made by Cybren

    • Checking wether a part of Memory is undefined

      Hello,

      i try to store a path only once in the global memory.

      if (Memory.Path == null) {
                  var Path = Game.rooms['W1N1'].findPath(fromsomewhere, tosomewhere, { serialize: true });
                  Memory.Path = Path;
              }
      console.log("Path:" + Memory.Path);

      The console logs: Path:        , thats logic because the if statment is false.

      Ofcourse Memory.Path is undefined, null, "" or something like this but i have tried everything  i can think about but the if check is never true, so what do i put in instead of null to get that working?

      When i look into the Memory i can type in a value for Path but as long as i am not doing it theres nothing as value declared.

      posted in Help
      Cybren