MapAndreas, Save HMap not working! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: MapAndreas, Save HMap not working! (
/showthread.php?tid=560907)
MapAndreas, Save HMap not working! -
Crayder - 31.01.2015
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)
Re: MapAndreas, Save HMap not working! -
DRIFT_HUNTER - 31.01.2015
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.
Re: MapAndreas, Save HMap not working! -
Crayder - 31.01.2015
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/".