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
[SOLVED] Strange BUG in the STRING read
Author Message
Coruja
Sphere Developer
*****

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

Dimension Shard

Post: #6
RE: [SOLVED] Strange BUG in the STRING read
You're not really using double eval on the same value, but using eval on 2 different values

Sphere return TAG/CTAG/VAR/LOCAL/ARGS/etc values in hex by default, so if you set SRC.CTAG0.achievement_1_1_palier=20, <SRC.CTAG0.achievement_1_1_palier> will return 014 (which is 20 in hex)

And this will turn <DEF0.achievement_1_1_palier<SRC.CTAG0.achievement_1_1_palier>> into <DEF0.achievement_1_1_palier014> (which will be 0 because this DEF doesn't exist) and not <DEF0.achievement_1_1_palier20> (which is 500). So to make it work you must read the tag using eval to turn <DEF0.achievement_1_1_palier014> into <DEF0.achievement_1_1_palier20>

Probably experimental build return 500 even without the eval because it automatically eval values by default. Its easy to make sphere return values in dec instead hex but maybe its better leave it returning hex to preserve script compatibility because sphere always had returned hex values since decades ago. But anyway deal with dec values is much more readable than hex, so I will take a better look to check if this can be changed without cause any drawbacks
11-22-2019 02:59 AM
Find all posts by this user Like Post Quote this message in a reply
[+] 2 users Like Coruja's post
Post Reply 


Messages In This Thread
RE: [SOLVED] Strange BUG in the STRING read - Coruja - 11-22-2019 02:59 AM

Forum Jump:


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