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-nmm7 (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-nmm7 (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-nmm7 (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
Little error
Author Message
Russian
Journeyman
*

Posts: 75
Likes Given: 4
Likes Received: 2 in 2 posts
Joined: Jul 2012
Reputation: 0



Post: #1
Little error
What is wrong in this script?
Code:
13:27:(Sphere types.scp,3462)Agrus 01cb938 : Metal chest brass 04011e096
13:27:ERROR:(Sphere types.scp,3463)Can't resolve <TOPOBJ.ISMYPET>
13:27:ERROR:(Sphere types.scp,3463)Undefined symbol ''
13:27:(Sphere types.scp,3462)Agrus 01cb938 : Metal chest brass 04011e096
13:27:ERROR:(Sphere types.scp,3463)Can't resolve <TOPOBJ.ISMYPET>
13:27:ERROR:(Sphere types.scp,3463)Undefined symbol ''
Script:
Code:
[TYPEDEF T_VENDOR_SELL]
ON=@CLICK
SERV.LOG <SRC.NAME> <SRC.UID> : <TOPOBJ.NAME> <TOPOBJ.UID>
IF !(<TOPOBJ.ISMYPET>)
  IF (<ISNUM <TAG0.PRICE>>)
    SRC.SYSMESSAGE @,,1 Чтобы приобрести это, скажите "Купить".
  ENDIF
ENDIF

ON=@DCLICK
IF (<TYPE>==t_container)
    IF !(<ISNUM <TAG0.PRICE>>) && !(<TOPOBJ.ISMYPET>)
    SRC.SYSMESSAGE @,,1 Предмет не для продажи, потому Вы не сможете заглянуть внутрь.
    ELSE
    OPEN
    ENDIF
    RETURN 1
ENDIF
11-27-2012 07:56 PM
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: #2
RE: Little error
ismypet can only be called off a character object, looks like topobj is an item, why not look if ischar first? that'll prevent the error.
Code:
if (<topobj.ischar>)
  if (<topobj.ismypet>)
    //code
  endif
endif

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

Marchadium :: http://www.marchadium.ca/ :: Join us!
11-28-2012 10:49 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Russian
Journeyman
*

Posts: 75
Likes Given: 4
Likes Received: 2 in 2 posts
Joined: Jul 2012
Reputation: 0



Post: #3
RE: Little error
If I am understand you:

Code:
[TYPEDEF T_VENDOR_SELL]
ON=@CLICK
SERV.LOG <SRC.NAME> <SRC.UID> : <TOPOBJ.NAME> <TOPOBJ.UID>
IF (<TOPOBJ.ISCHAR>)
    IF !(<TOPOBJ.ISMYPET>)
      IF (<ISNUM <TAG0.PRICE>>)
        SRC.SYSMESSAGE @,,1 Чтобы приобрести это, скажите "Купить".
      ENDIF
    ENDIF
ENDIF

ON=@DCLICK
IF (<TYPE>==T_CONTAINER)
    IF !(<ISNUM <TAG0.PRICE>>)
        IF (<TOPOBJ.ISCHAR>)
            IF !(<TOPOBJ.ISMYPET>)
            SRC.SYSMESSAGE @,,1 Предмет не для продажи, потому Вы не сможете заглянуть внутрь.
            ELSE
            OPEN
            ENDIF
        ENDIF
    RETURN 1
    ENDIF
ENDIF
(This post was last modified: 11-28-2012 03:14 PM by Russian.)
11-28-2012 03:13 PM
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: #4
RE: Little error
Yes...

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

Marchadium :: http://www.marchadium.ca/ :: Join us!
11-30-2012 05:33 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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