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
console error when adding new items
Author Message
kn4tseb
Master
**

Posts: 392
Likes Given: 45
Likes Received: 10 in 10 posts
Joined: May 2014
Reputation: 0



Post: #1
console error when adding new items
Okey fellas, im having this issue, everything works but i have a console error which is pretty annoying..

ERROR:(sphere_system_bod.scp,434)Undefined symbol ''


Code:
ON=@DropOn_Char
// ..... lot of code lines...


           ELIF (<tag0.bod3> == 1)
         src.sound 87
         src.newgold <eval <strarg <streat <tag0.bod>>>*<serv.itemdef.<streat <streat <tag0.bod>>>.value>>
         src.sysmessage You receive <eval <strarg <streat <tag0.bod>>>*<serv.itemdef.<streat <streat <tag0.bod>>>.value>> gold as reward.
         argo.say Thank you so much!, here is your reward.
         remove
         if <src.tag0.bod2> == 1
            if <eval <src.tag0.bod3>> >= 25 && <eval <src.tag0.bod3>> =< 100 // poor reward
               serv.newitem { i_leather_gloves_mining 500 i_studded_gloves_mining 250 i_ringmail_gloves_mining 100 i_colored_anvil 40 i_powder_of_fortifying 40 i_hammer_prospector_tool 40 i_pickaxe_gargish 40 i_ancient_smithy_hammer 20 }
            elif <eval <src.tag0.bod3>> > 100 && <eval <src.tag0.bod3>> =< 250 // medium reward
               serv.newitem { i_leather_gloves_mining 150 i_studded_gloves_mining 150 i_ringmail_gloves_mining 150 i_colored_anvil 150 i_powder_of_fortifying 150 i_hammer_prospector_tool 150 i_pickaxe_gargish 150 i_ancient_smithy_hammer 50 i_power_scroll 1 i_stat_power_scroll 1 <runichammers> 10 }  
            elif <eval <src.tag0.bod3>> > 250 && <eval <src.tag0.bod3>> =< 500 // rich reward
           serv.newitem { i_leather_gloves_mining 150 i_studded_gloves_mining 150 i_ringmail_gloves_mining 150 i_colored_anvil 150 i_powder_of_fortifying 150 i_hammer_prospector_tool 150 i_pickaxe_gargish 150 i_ancient_smithy_hammer 100 i_power_scroll 5 i_stat_power_scroll 5 <runichammers> 50 }
            elif <eval <src.tag0.bod3>> > 500 // richest reward
               serv.newitem { i_hammer_prospector_tool 150 i_pickaxe_gargish 150 i_ancient_smithy_hammer 150 i_power_scroll 150 i_stat_power_scroll 150 <runichammers> 150 }
            endif
            if <new>
               new.bounce
            endif
          src.tag0.bod3 =
         endif
     src.tag0.bod2 = <eval <src.tag0.bod2>-1>
         if <src.tag0.bod2> == 0
            src.tag0.bod2 =
        src.tag0.bod4 =
         endif
      return 1 // delete
      ENDIF
Code:
LINE 434:          src.newgold <eval <strarg <streat <tag0.bod>>>*<serv.itemdef.<streat <streat <tag0.bod>>>.value>>

i really dont understand where could it be the error, maybe when adding two items at the same time? (gold and reward).
the value of <eval <strarg <streat <tag0.bod>>>*<serv.itemdef.<streat <streat <tag0.bod>>>.value>> is correct, checked and rechecked, the correct amount of money is bounced and sysmessage with amount is fine too.
(This post was last modified: 07-26-2014 10:02 AM by kn4tseb.)
07-26-2014 09:50 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: #2
RE: console error when adding new items
be sure tag0.bod is set with 2 values, looks like sphere is giving you this error because tag0.bod only has 1 value. example:
Code:
tag.bod=arg1,arg2
without arg2 set sphere will return that error.

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

Marchadium :: http://www.marchadium.ca/ :: Join us!
(This post was last modified: 07-26-2014 10:09 AM by Skul.)
07-26-2014 10:09 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
kn4tseb
Master
**

Posts: 392
Likes Given: 45
Likes Received: 10 in 10 posts
Joined: May 2014
Reputation: 0



Post: #3
RE: console error when adding new items
i understand skull but it actually has three values, thats why i have to strarg and streat a <streat value>
but i will take a look Smile

EDIT:

serv.log <tag0.bod>
serv.log <streat <streat <tag0.bod>>>
serv.log <strarg <streat <tag0.bod>>>
serv.log <eval <strarg <streat <tag0.bod>>>*<serv.itemdef.<streat <streat <tag0.bod>>>.value>>

(sphere_system_bod.scp,367)022ab2, 29, i_staff_bladed_double
(sphere_system_bod.scp,368)i_staff_bladed_double
(sphere_system_bod.scp,369)29
(sphere_system_bod.scp,370)2726

first it has a <src>, <a number of needed items>, <itembaseid>


I rechecked and cant see a problem with it >.<
(This post was last modified: 07-26-2014 10:38 AM by kn4tseb.)
07-26-2014 10:27 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: #4
RE: console error when adding new items
be sure the object has tag.bod properly set, you might have a script somewhere that leaves out a value or two.

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

Marchadium :: http://www.marchadium.ca/ :: Join us!
(This post was last modified: 07-26-2014 10:38 AM by Skul.)
07-26-2014 10:38 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
kn4tseb
Master
**

Posts: 392
Likes Given: 45
Likes Received: 10 in 10 posts
Joined: May 2014
Reputation: 0



Post: #5
RE: console error when adding new items
i totally get it skull but this is the thing... if i remove the "reward" side of the script i get no errors at console..
and the money is bounced .... if i add the newitem reward as shown in the first post everything works fine too, but i get that annoying error at console pointing a line... but if i comment that line, the error is still shown at the very same commented line :/
NO ERRORS:

Code:
ELIF (<tag0.bod3> == 1)
         src.sound 87
         src.newgold <eval <strarg <streat <tag0.bod>>>*<serv.itemdef.<streat <streat <tag0.bod>>>.value>>
         src.sysmessage You receive <eval <strarg <streat <tag0.bod>>>*<serv.itemdef.<streat <streat <tag0.bod>>>.value>> gold as reward.
         argo.say Thank you so much!, here is your reward.
         remove

     src.tag0.bod2 = <eval <src.tag0.bod2>-1>
         if <src.tag0.bod2> == 0
            src.tag0.bod2 =
        src.tag0.bod4 =
         endif
      return 1 // borrar
      ENDIF

EDIT:

ERROR:(sphere_system_bod.scp,435)Undefined symbol ''
line 435:
Code:
//         src.newgold <eval <strarg <streat <tag0.bod>>>*<serv.itemdef.<streat <streat <tag0.bod>>>.value>>

Code:
ELIF (<tag0.bod3> == 1)
         src.sound 87
//         src.newgold <eval <strarg <streat <tag0.bod>>>*<serv.itemdef.<streat <streat <tag0.bod>>>.value>>
         src.sysmessage You receive <eval <strarg <streat <tag0.bod>>>*<serv.itemdef.<streat <streat <tag0.bod>>>.value>> gold as reward.
         argo.say Thank you so much!, here is your reward.
         remove
         if <src.tag0.bod2> == 1
            if <eval <src.tag0.bod3>> >= 25 && <eval <src.tag0.bod3>> =< 100 // poor reward
               serv.newitem { i_leather_gloves_mining 500 i_studded_gloves_mining 250 i_ringmail_gloves_mining 100 i_colored_anvil 40 i_powder_of_fortifying 40 i_hammer_prospector_tool 40 i_pickaxe_gargish 40 i_ancient_smithy_hammer 20 }
            elif <eval <src.tag0.bod3>> > 100 && <eval <src.tag0.bod3>> =< 250 // medium reward
               serv.newitem { i_leather_gloves_mining 150 i_studded_gloves_mining 150 i_ringmail_gloves_mining 150 i_colored_anvil 150 i_powder_of_fortifying 150 i_hammer_prospector_tool 150 i_pickaxe_gargish 150 i_ancient_smithy_hammer 50 i_power_scroll 1 i_stat_power_scroll 1 <runichammers> 10 }  
            elif <eval <src.tag0.bod3>> > 250 && <eval <src.tag0.bod3>> =< 500 // rich reward
           serv.newitem { i_leather_gloves_mining 150 i_studded_gloves_mining 150 i_ringmail_gloves_mining 150 i_colored_anvil 150 i_powder_of_fortifying 150 i_hammer_prospector_tool 150 i_pickaxe_gargish 150 i_ancient_smithy_hammer 100 i_power_scroll 5 i_stat_power_scroll 5 <runichammers> 50 }
            elif <eval <src.tag0.bod3>> > 500 // richest reward
               serv.newitem { i_hammer_prospector_tool 150 i_pickaxe_gargish 150 i_ancient_smithy_hammer 150 i_power_scroll 150 i_stat_power_scroll 150 <runichammers> 150 }
            endif
            if <new>
               new.bounce
            endif
          src.tag0.bod3 =
         endif
     src.tag0.bod2 = <eval <src.tag0.bod2>-1>
         if <src.tag0.bod2> == 0
            src.tag0.bod2 =
        src.tag0.bod4 =
         endif
      return 1 // borrar
      ENDIF
(This post was last modified: 07-26-2014 10:55 AM by kn4tseb.)
07-26-2014 10:47 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: #6
RE: console error when adding new items
just to be on the safe side, try out this code:
Code:
src.newgold <eval <qval <isempty <strarg <streat <tag0.bod>>> ?0:<strarg <streat <tag0.bod>>>> *<serv.itemdef.<strarg <streat <streat <tag0.bod>>>>.value>>

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

Marchadium :: http://www.marchadium.ca/ :: Join us!
07-26-2014 11:13 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
kn4tseb
Master
**

Posts: 392
Likes Given: 45
Likes Received: 10 in 10 posts
Joined: May 2014
Reputation: 0



Post: #7
RE: console error when adding new items
ehmm i might have done some wrong but it's still weird:

22:25:ERROR:(sphere_system_bod.scp,430)Undefined symbol ''
22:25:ERROR:(sphere_system_bod.scp,430)Undefined symbol 'eval'
22:25:ERROR:(sphere_system_bod.scp,430)Undefined symbol 'qval'
22:25:ERROR:(sphere_system_bod.scp,435)Undefined symbol ''

LINE 430:
Code:
argo.say This bulk order deed is not completed!.
LINE 435
Code:
src.newgold <eval <qval <isempty <strarg <streat <tag0.bod>>> ?0:<strarg <streat <tag0.bod>>>> *<serv.itemdef.<strarg <streat <streat <tag0.bod>>>>.value>>
looks like the console shows an error 5 lines below the real one lol

OHH I FOUND THE ERROR!!! i wrote =< instead of <=

i feel baaaaaaaaad sorry for taking your time skull and thank you!, about the qval use, im gonna read about it... seems pretty usefull
Big Grin
(This post was last modified: 07-26-2014 11:50 AM by kn4tseb.)
07-26-2014 11:23 AM
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)