Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Tech Support (https://forums.graalonline.com/forums/forumdisplay.php?f=7)
-   -   findnpcbyid(); Bug (https://forums.graalonline.com/forums/showthread.php?t=134265029)

ffcmike 11-12-2011 05:56 PM

findnpcbyid(); Bug
 
It seems to be the case with both the V5 and V6 client that findnpcbyid(); is not working upon, or within a split second of entering or re-entering a level.

Lets say I have multiple NPCs containing:

PHP Code:

//#CLIENTSIDE
function onCreated(){
  if(!(
this.id in this.level.items)){
    
this.level.items.add(this.id);
  }


And within another NPC I have:

PHP Code:

function onPlayerTouchsMe(){
  for(
temp.this.level.items){
    
temp.findnpcbyid(temp.i);
    
this.doSomething(temp.n);
  }


If I were to somehow touch this NPC within a slight moment of re-entering the level, findnpcbyid(); fails to return the npc object. I'm pretty sure the problem is with findnpcbyid(); as all the id values within the array are fine.

Could this possibly be fixed within the new client?

Gunderak 11-28-2011 09:17 AM

So you ended up finding of what was causing the problem, yay bug fix on the way..


All times are GMT +2. The time now is 08:29 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.