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
Sphere 56d - function isbit
Author Message
Indiaret
Apprentice
*

Posts: 45
Likes Given: 3
Likes Received: 1 in 1 posts
Joined: Apr 2016
Reputation: 0



Post: #1
Sphere 56d - function isbit
Hi,

probably I found the bug in sphere 56d. Any idea why this don't work in sphere 56d ? It works fine in 56c . Any changes or its bug in 56d (or my mistake) ?

Code:
[function testIsbit]
local.test2=<hval dam_physical>
local.typeDmg=<getResist <local.test2>>
sysmessage Type of dmgs: <local.typeDmg> and test: <local.test2>

[function getResist]
local.is_god=<isbit <argv(0)>,0>
if (<local.is_god>)
local.is_god=1
endif
local.is_physical=<isbit <argv(0)>,1>
if (<local.is_physical>)
local.is_physical=1
endif
local.is_magical=<isbit <argv(0)>,2>
if (<local.is_magical>)
local.is_magical=1
endif
local.Flags=<eval <local.is_god>+<local.is_physical>+<local.is_magical>>
return <local.Flags>

It returns in sysmessage (0.56d):
Type of dmgs: 0 and test: 02

It returns in sysmessage (0.56c):
Type of dmgs: 01 and test: 02
Thanks
(This post was last modified: 03-06-2019 02:06 AM by Indiaret.)
03-06-2019 02:01 AM
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: #2
RE: Sphere 56d - function isbit
confirmed, the function ISBIT is not working correctly (it's always using 0 on second args)

but anyway I already fixed it, try update to latest sphere build to check if it's working fine now
03-10-2019 05:09 PM
Find all posts by this user Like Post Quote this message in a reply
Indiaret
Apprentice
*

Posts: 45
Likes Given: 3
Likes Received: 1 in 1 posts
Joined: Apr 2016
Reputation: 0



Post: #3
RE: Sphere 56d - function isbit
Tried. Looks it works correctly.

Good job, thanks for fix Wink
03-10-2019 10:00 PM
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)