Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Tech Support (https://forums.graalonline.com/forums/forumdisplay.php?f=7)
-   -   player.x/y in |min,max| (https://forums.graalonline.com/forums/showthread.php?t=62262)

Yen 11-14-2005 03:55 AM

player.x/y in |min,max|
 
The condition 'player.x/y in |min,max|' always returns false, no matter what the values are. I have to use <= and >= if I want to check if the player's x or y is in a range. I don't know if this is intended, but this problem has been around for a long time.

CheeToS2 11-14-2005 05:17 AM

It seems to be working fine for me:
NPC Code:

//#CLIENTSIDE
function onCreated() {
setTimer(.05);
}
function onTimeout() {
if (player.x in |30,40|)
player.chat = "TRUE";
else
player.chat = player.x;
setTimer(.05);
}


napo_p2p 11-14-2005 06:31 AM

Works for me too.

Lance 11-14-2005 06:32 AM

What about serverside?

CheeToS2 11-14-2005 06:53 AM

Quote:

Originally Posted by Lance
What about serverside?

Also works.

Admins 11-14-2005 02:33 PM

In new scripting engine you cannot do
PHP Code:

x,y in |min,max

anymore, you need to do
PHP Code:

x in |min,max| && y in |min,max

(that would work in both engines) or
PHP Code:

{x,yin |min,max

which wouldn't work in old engine though

Yen 11-16-2005 12:41 AM

Er.. Yeah, I mean't x or y, not x,y. :p

That's really strange.. It won't work for me, serverside or clientside.

CheeToS2 11-17-2005 10:37 AM

Quote:

Originally Posted by Yen
Er.. Yeah, I mean't x or y, not x,y. :p

That's really strange.. It won't work for me, serverside or clientside.

What server/script is it? I will look at it when I have time (not sure when that will be, kind of busy lately).


All times are GMT +2. The time now is 01:14 AM.

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