SphereCommunity

Full Version: Sphere 56d - function isbit
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
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
Tried. Looks it works correctly.

Good job, thanks for fix Wink
Reference URL's