Quote:
Originally Posted by Mark Sir Link
It's not, I was having issues with this the other night.
If the level is in a GMAP and you try to findlevel it, will get an empty string returned.
|
A GMAP is still a TServerLevel object, so I think you just misread what I said. I was just pointing out that he doesn't need to use findlevel at all.
Code:
PHP Code:
function onCreated() {
with (findplayer("fowlplay4")) {
echo("Level Type: " @ player.level.objecttype());
echo("Level Name: " @ player.level.name);
echo("GMAP Level: " @ player.level.getmappartfile(player.x, player.y));
echo("GMAP Level Type: " @ findlevel(player.level.getmappartfile(player.x, player.y)).objecttype());
}
}
Quote:
|
Originally Posted by Output
Level Type: TServerLevel
Level Name: zodiacworld.gmap
GMAP Level: zodiacworld_ak14.nw
GMAP Level Type: 0 (Indicates that findlevel doesn't work on specific GMAP levels)
Level Type: TServerLevel
Level Name: onlinestartlocal.nw
GMAP Level: onlinestartlocal.nw
GMAP Level Type: TServerLevel
|
@Omega: Check if it's working in the top-left corner of your GMAP, and if it is try removing the '% 64' because according to the output above you're finding the GMAP level as a whole not the specific level.