EOSERV Forum > Programming > maps loaded not being displayed
Topic is locked.
Page: << 1 >>
maps loaded not being displayed
Author Message
Post #195489 maps loaded not being displayed

Can someone explain these two lines of code to me?


this->maps[i] = new Map(i + 1, this);
      
        if (this->maps[i]->exists)
       

In my rev, the program doesn't get past the if statement. Any clues as to what might have caused this? The maps are being loaded and the logout in Map::Load verifies this.
Since it doesn't get past this if statement, "0/number maps are loaded"


Thanks,
-Alex

---
I not hacker

“Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its
whole life believing that it is stupid.” - Albert Einstein : Really Great Quote Ramy!
10 years, 11 weeks ago
Post #195490 Re: maps loaded not being displayed

this->maps[i] = new Map(i + 1, this);
      

        if (this->maps[i]->exists)  


Basically it iterates through an array and creates a new map.


Hopefully my example below helps you understand what is going on.


  • [EXAMPLE]   this-> MAP STORAGE[MAP NUMBER] = CREATE A MAP(MAP NUMBER + 1, ADDRESS OF CLASS);
  • [REAL] this->maps[i] = new Map(i + 1, this);

After that it looks like the IF statement is checking to see if the map was sucessfully created. I haven't messed with EOServ in over a year so it might not be what that does. 

---
I forgot what I was going to write...
10 years, 11 weeks ago
Post #195494 Re: maps loaded not being displayed

I fixed it thanks Jimbo! I put a return false before it was able to load the maps it found lol. thats why. silly me :P

---
I not hacker

“Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its
whole life believing that it is stupid.” - Albert Einstein : Really Great Quote Ramy!
10 years, 11 weeks ago
Page: << 1 >>
Topic is locked.
EOSERV Forum > Programming > maps loaded not being displayed