View Single Post
  #6  
Old 04-14-2011, 08:50 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Quote:
Originally Posted by Mark Sir Link View Post
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.xplayer.y));
    echo(
"GMAP Level Type: " findlevel(player.level.getmappartfile(player.xplayer.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.
__________________
Quote:
Reply With Quote