MapAndreas, Save HMap not working!
#1

First off, my code:
pawn Код:
MapAndreas_Init(MAP_ANDREAS_MODE_MINIMAL, "scriptfiles/ATD.hmap");

    for(new x=-2000; x<2000; x++) for(new y=-2000; y<2000; y++)
    {
        new Float:z;
        MapAndreas_FindZ_For2DCoord(float(x), float(y), z);
        if(z != 500.0)
        {
            z = 500.0;
            MapAndreas_SetZ_For2DCoord(float(x), float(y), z);
        }
        printf("%0.1f, %0.1f : %0.1f", float(x), float(y), z);
    }
   
    MapAndreas_SaveCurrentHMap("scriptfiles/ATD.hmap");
This should set each 1x1 from -2000, -2000 through 2000, 2000 to 500.0. Then it should save the map.
It does set the heights to 500.0, but it does not create the file. What am I doing wrong here?

(Ps. It does create the file, but the file is only 0 kb, not even one character inside)
Reply
#2

I think map andreas saves map to scriptfiels by default, if so you dont need to add scriptfiles folder into a path.
If you do than its trying to save to SERVER_ROOT/scriptfiles/scriptfiles/ATD.hmap

Just remove scriptfiles/ from path and it shall work if im right.
Reply
#3

Quote:
Originally Posted by DRIFT_HUNTER
Посмотреть сообщение
I think map andreas saves map to scriptfiels by default, if so you dont need to add scriptfiles folder into a path.
If you do than its trying to save to SERVER_ROOT/scriptfiles/scriptfiles/ATD.hmap

Just remove scriptfiles/ from path and it shall work if im right.
Nope, check the mapandreas thread, it says it needs to include "scriptfiles/".
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)