The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Roomdef error on @regionenter
Author Message
Rizz
Master
**

Posts: 396
Likes Given: 21
Likes Received: 14 in 9 posts
Joined: Oct 2012
Reputation: 0



Post: #1
Roomdef error on @regionenter
After my sphere version update, when i trigger @RegionEnter entering into a ROOMDEF i get this:

PHP Code:
ON=@RegionEnter
src
.message <argo.defname

PHP Code:
01:05:ERROR:(events_pg.scp,820)Can't resolve <argo.defname> 


How to check if i'm entering an AREADEF or ROOMDEF?
06-24-2014 09:10 AM
Find all posts by this user Like Post Quote this message in a reply
Rizz
Master
**

Posts: 396
Likes Given: 21
Likes Received: 14 in 9 posts
Joined: Oct 2012
Reputation: 0



Post: #2
RE: Roomdef error on @regionenter
I think the problem is related to the missing defname definition for ROOMDEF. That's why i need to check if i'm entering an aeradef or roomdef in order to restrict the code and avoid the error.
06-24-2014 07:12 PM
Find all posts by this user Like Post Quote this message in a reply
Coruja
Sphere Developer
*****

Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

Dimension Shard

Post: #3
RE: Roomdef error on @regionenter
try using <ARGO.REGION.DEFNAME> or <ARGO.REGION.REGION.DEFNAME> (double REGION will make you get the AREADEF reference instead ROOMDEF)

also if you're using @RegionEnter just to check a few regions, you can use @Enter directly on the AREADEF instead use @RegionEnter on chars
06-25-2014 04:00 AM
Find all posts by this user Like Post Quote this message in a reply
Rizz
Master
**

Posts: 396
Likes Given: 21
Likes Received: 14 in 9 posts
Joined: Oct 2012
Reputation: 0



Post: #4
RE: Roomdef error on @regionenter
Nothing.
I also tried <src.region.defname> but it returns the leaving region.

Is there noway to detect a roomdef?
In that way i could use

If !<roomdef>
argo.defname
endif

Right now, the solutions are:

1) move everything under @enter as you suggested
2) leave the code under @regionenter, mark the interesting regions with a tag then check that tag first under @regionenter
(This post was last modified: 06-25-2014 06:48 AM by Rizz.)
06-25-2014 06:22 AM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #5
RE: Roomdef error on @regionenter
<room> it returns 1 when you enter in a "room-region", 0 otherwise.

Anyway, you can't access the room defname but just its other properties :\ .

Edit : <room> and <room.properties> works weird in @regionenter
(This post was last modified: 06-25-2014 07:23 AM by darksun84.)
06-25-2014 07:21 AM
Find all posts by this user Like Post Quote this message in a reply
Rizz
Master
**

Posts: 396
Likes Given: 21
Likes Received: 14 in 9 posts
Joined: Oct 2012
Reputation: 0



Post: #6
RE: Roomdef error on @regionenter
(06-25-2014 07:21 AM)darksun84 Wrote:  <room> it returns 1 when you enter in a "room-region", 0 otherwise.

Anyway, you can't access the room defname but just its other properties :\ .

Edit : <room> and <room.properties> works weird in @regionenter

I don't need the room defname, i just need to know if i'm entering a room to don't cheack the defname and don't generate the error.

(06-25-2014 07:21 AM)darksun84 Wrote:  Edit : <room> and <room.properties> works weird in @regionenter


Yes... <room> under @regionenter is referred to the area that your are leaving.

<argo.room> doesn't work
(This post was last modified: 06-25-2014 08:39 AM by Rizz.)
06-25-2014 08:28 AM
Find all posts by this user Like Post Quote this message in a reply
Skul
Master
**

Posts: 413
Likes Given: 0
Likes Received: 19 in 15 posts
Joined: Jun 2012
Reputation: 9



Post: #7
RE: Roomdef error on @regionenter
just to be sure, have you tried
Code:
<uid.<argo.uid>.defname>
sometimes sphere has problems reading from argo and uid is needed.

"I ask a question to the answer I already know."

Marchadium :: http://www.marchadium.ca/ :: Join us!
06-25-2014 09:00 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Rizz
Master
**

Posts: 396
Likes Given: 21
Likes Received: 14 in 9 posts
Joined: Oct 2012
Reputation: 0



Post: #8
RE: Roomdef error on @regionenter
(06-25-2014 09:00 AM)Skul Wrote:  just to be sure, have you tried
Code:
<uid.<argo.uid>.defname>
sometimes sphere has problems reading from argo and uid is needed.

Not working Sad
06-25-2014 09:29 AM
Find all posts by this user Like Post Quote this message in a reply
Rizz
Master
**

Posts: 396
Likes Given: 21
Likes Received: 14 in 9 posts
Joined: Oct 2012
Reputation: 0



Post: #9
RE: Roomdef error on @regionenter
I found a solution.
I compiled a small .exe program to add under every [ROOMDEF] a string (like TAG.ISROOM=1 or whatever you like].

Now i can properly check if i'm entering a room or not:

PHP Code:
ON=@REGIONENTER
IF (!<argo.TAG0.ISROOM>)
src.message <argo.defname>
ENDIF 

If this exe could be usefull to someone i can share it.
(This post was last modified: 06-28-2014 09:44 AM by Rizz.)
06-28-2014 08:47 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 5 Guest(s)