Graal Forums  

Go Back   Graal Forums > Development Forums > Tech Support
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-02-2010, 06:40 PM
MrOmega MrOmega is offline
One More Time
MrOmega's Avatar
Join Date: Aug 2010
Location: TN, USA
Posts: 631
MrOmega is an unknown quantity at this point
Send a message via AIM to MrOmega Send a message via MSN to MrOmega Send a message via Yahoo to MrOmega
tesplayer()

Well, I'm testing for players serverside and testplayers just returns -2, and by accident I put testplayers() and it returned properly but I got the error "Function testplayers not found at line 191", now how can it return something if it doesnt exist?
__________________
Time is the fire in which we burn...
Up, Up, Down, Down, Left, Right, Left, Right, B, A, Select, Start! Now I got 99 LIVES!!!
Reply With Quote
  #2  
Old 11-02-2010, 06:42 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Quote:
Originally Posted by MrOmega View Post
Well, I'm testing for players serverside and testplayers just returns -2, and by accident I put testplayers() and it returned properly but I got the error "Function testplayers not found at line 191", now how can it return something if it doesnt exist?
What -did- it return, and can you show the example code?
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #3  
Old 11-02-2010, 06:46 PM
MrOmega MrOmega is offline
One More Time
MrOmega's Avatar
Join Date: Aug 2010
Location: TN, USA
Posts: 631
MrOmega is an unknown quantity at this point
Send a message via AIM to MrOmega Send a message via MSN to MrOmega Send a message via Yahoo to MrOmega
I echoed this and it was NULL
PHP Code:
playerstestplayerparams0], params1])].account 
then I did
PHP Code:
playerstestplayersparams0], params1])].account 
and it echoed my account, along with my other account
( I had both logged on, close together, this is in a loop, I'm using findnearestplayers now btw)
__________________
Time is the fire in which we burn...
Up, Up, Down, Down, Left, Right, Left, Right, B, A, Select, Start! Now I got 99 LIVES!!!
Reply With Quote
  #4  
Old 11-02-2010, 11:05 PM
salesman salesman is offline
Finger lickin' good.
salesman's Avatar
Join Date: Nov 2008
Location: Colorado
Posts: 1,865
salesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud of
Are you testing it in a pk zone? I haven't tried to use this in a while, but I remember testplayer() only working in pk zones.

If you want to find a player in a non-pk zone, you need to use findNearestPlayers().
__________________
Reply With Quote
  #5  
Old 11-02-2010, 11:18 PM
DrakilorP2P DrakilorP2P is offline
Registered User
DrakilorP2P's Avatar
Join Date: Apr 2006
Posts: 755
DrakilorP2P is just really niceDrakilorP2P is just really nice
Quote:
Originally Posted by MrOmega View Post
I echoed this and it was NULL
PHP Code:
playerstestplayerparams0], params1])].account 
then I did
PHP Code:
playerstestplayersparams0], params1])].account 
and it echoed my account, along with my other account
( I had both logged on, close together, this is in a loop, I'm using findnearestplayers now btw)
Could it be that 'testplayers' didn't exist so it defaulted to 0 and the line returned the first player in the array?
Reply With Quote
  #6  
Old 11-02-2010, 11:20 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by DrakilorP2P View Post
Could it be that 'testplayers' didn't exist so it defaulted to 0 and the line returned the first player in the array?
Pretty sure it did just that.
Reply With Quote
  #7  
Old 11-03-2010, 12:27 AM
MrOmega MrOmega is offline
One More Time
MrOmega's Avatar
Join Date: Aug 2010
Location: TN, USA
Posts: 631
MrOmega is an unknown quantity at this point
Send a message via AIM to MrOmega Send a message via MSN to MrOmega Send a message via Yahoo to MrOmega
Quote:
Originally Posted by Crow View Post
Pretty sure it did just that.
but returns a list containing both of my accounts...
__________________
Time is the fire in which we burn...
Up, Up, Down, Down, Left, Right, Left, Right, B, A, Select, Start! Now I got 99 LIVES!!!
Reply With Quote
  #8  
Old 11-03-2010, 11:41 PM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
testplayers only returns players that are blocking as I remember so it's useless in nopk zones
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:34 PM.


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