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
Unidentified Symbol:
Author Message
Mordaunt
Super Moderator
****

Posts: 1,237
Likes Given: 26
Likes Received: 55 in 43 posts
Joined: Mar 2012
Reputation: 35



Post: #1
Unidentified Symbol:
I have been trouble shooting this for a couple of hours and it won't go away,
I get the error Undefined symbol ''
Based on this section of my script:

Code:
[FUNCTION acc_is_owner]
for <src.account.chars>
    if (<account.char.<eval <local._for>-1>.is_owner>)
        return 1
    endif
endfor
return 0

specifically the if (<account.char.<eval <local._for>-1>.is_owner>) line.

There is nothing wrong with this function it runs perfectly everywhere else in the script when it is called where the player is src (and it is called a lot!)

It is causing the error ONLY WHEN CALLED BY THIS EVENT where the player is default rather than src
Code:
ON=@ItemDClick
    if !(strcmpi(*<strarg <act.name>>*, *Recovery*)) || (<act.defname>==<def.vendor_deed_id>)
        if <QVAL (<def.account_ownership>)? (<I.is_owner>) || (<I.acc_is_owner>):(<I.is_owner>)> || (<I.is_coowner>) || (<I.is_friend>)
            obj=<region.tag0.sign>
            if (<obj.dtag0.vendors> < <obj.dtag0.max_vendors>)
                obj.tag0.vendors += 1
                return 0
            else
                sysmessage @,,1 You have no available vendor slots
                sysmessage @,,1 You must remove an existing vendor before you can place a new one.
                return 1
            endif
        else
                sysmessage @,,1 Only people on the house list may place vendors here
                return 1
        endif
endif

Looking for a fresh pair of eyes here to see if anyone can see what I am missing.

[Image: 2nis46r.jpg]
(This post was last modified: 10-16-2012 12:56 PM by Mordaunt.)
10-16-2012 12:55 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #2
RE: Unidentified Symbol:
PHP Code:
[FUNCTION acc_is_owner]
for 
<account.chars>
    if (<
account.char.<eval <local._for>-1>.is_owner>)
        return 
1
    
endif
endfor
return 


STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
(This post was last modified: 10-16-2012 02:02 PM by Extreme.)
10-16-2012 02:00 PM
Find all posts by this user Like Post Quote this message in a reply
Mordaunt
Super Moderator
****

Posts: 1,237
Likes Given: 26
Likes Received: 55 in 43 posts
Joined: Mar 2012
Reputation: 35



Post: #3
RE: Unidentified Symbol:
As I said last night...

That does not fix it.

The problem is coming from the fact that I am calling the function when the player is default rather than src.
The function works fine as is. Even changing to how you wrote it the error remains.

The whole script actually does everything it is supposed to do despite the error

[Image: 2nis46r.jpg]
(This post was last modified: 10-16-2012 11:36 PM by Mordaunt.)
10-16-2012 11:15 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
ShiryuX
Journeyman
*

Posts: 249
Likes Given: 1
Likes Received: 19 in 14 posts
Joined: Mar 2010
Reputation: 4



Post: #4
RE: Unidentified Symbol:
Try to read the account as serv instead of using the char.
10-17-2012 01:17 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
RanXerox
Master
**

Posts: 550
Likes Given: 1
Likes Received: 12 in 9 posts
Joined: Dec 2010
Reputation: 19



Post: #5
RE: Unidentified Symbol:
Here is a thought. Rewrite it to be able to function on an object, as in: SRC.acc_is_owner
...and be able to accept an argument to act on, as in: acc_is_owner <SRC>
Then in the code itself, use TRYSRC <ARGN> or whatever to make your other case work.
10-17-2012 01:18 AM
Find all posts by this user Like Post Quote this message in a reply
Mordaunt
Super Moderator
****

Posts: 1,237
Likes Given: 26
Likes Received: 55 in 43 posts
Joined: Mar 2012
Reputation: 35



Post: #6
RE: Unidentified Symbol:
Tried your method last night ShiryuX, produced a whole load of errors.

Looking at your suggestions RanXerox, but not fully grasping what you mean.


Okay....

ShiryuX has shown me the error of my ways Tongue

[Image: 2nis46r.jpg]
(This post was last modified: 10-17-2012 04:43 AM by Mordaunt.)
10-17-2012 03:29 AM
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: 1 Guest(s)