Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sphere 56d - function isbit
Author Message
Indiaret
Apprentice
*

Posts: 33
Likes Given: 2
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: 843
Likes Given: 4
Likes Received: 196 in 162 posts
Joined: Jul 2012
Reputation: 6

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: 33
Likes Given: 2
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)

This forum uses Lukasz Tkacz MyBB addons.