Banner
Views: 625,176,687
Time:
6 users online: Aouzy, Caulifla, crith, GamerMario101, Lugigi, PaperWario - Guests: 65 - Bots: 188Users: 34,562 (1,452 active)
Latest: Darius567
Tip: Take advantage of easy to install Patches in your hack. The No More Sprite Tile Limits patch should be considered if you're encountering glitches where Mario and/or sprites are turning invisible.Not logged in.
Asar: Under new management
Forum Index - SMW Hacking - Resource & Tool Releases - Asar: Under new management
Pages: « 1 ... 11 12 13 14 15 16 17 »
Originally posted by randomdude999
print double() seems to be a bit broken, for now just use dec() and hex().
Code
math round off
print dec(round(3/2, 0))


Rounds 1.5 to 0.

Originally posted by RPG Hacker
Code
math round off
print double(round(100/3, 0), 5)


Originally posted by error
error: Malformed function call. [print double(round(100/3,0),5)]


I'll wait till asar gets those fixed.

--------------------
Really hope Asar's %CallMacro() issues are fixed.
What version are you using? For me (i tried both 1.50 and the current master), "print dec(round(3/2, 0))" with "math round off" prints 2.
Originally posted by GreenHammerBro
Originally posted by error
error: Malformed function call. [print double(round(100/3,0),5)]


I'll wait till asar gets those fixed.


To my defense: I'm an idiot! :O
For some reason, I thought making the double() function only read to the first comma/the first closing parenthesis was fine. This means that both versions of the function are currently broken.

Will have to rewrite the function and do it properly this time (I'm assuming it should be possible to just let the math parser figure out where the second argument begins).

As for why the first example results in 0... I have no idea. It really shouldn't. Is that the actual code you used? Is it the only code in your test file? I'll try to reproduce it later.

--------------------
Feel free to visit my website/blog - it now isn't actually shit anymore!
I test the actual code they sent me. It only have these code and nothing else.

--------------------
Really hope Asar's %CallMacro() issues are fixed.
1. Use this version of asar.
2. Apply this patch.
3. Try to fucking tell me that it prints 0.
Originally posted by Asar
Enter patch name: "C:\Users\GreenHammerBro\Desktop\smw romhacking\General Tools\asar beta\test.asm"
Enter ROM name: "C:\Users\GreenHammerBro\Desktop\smw romhacking\General Tools\asar beta\Copy of Super Mario World.smc"
2
Assembling completed without problems.
Press any key to continue . . .


Didn't print a 0.

--------------------
Really hope Asar's %CallMacro() issues are fixed.
So either you were using a different version (I think you never stated which version you used), or the code you quoted wasn't the code you originally tested. It's the exact same code as in that ASM file.

--------------------
Feel free to visit my website/blog - it now isn't actually shit anymore!
I did test that code and asar version from that post, not the one I made myself, 100% from that post.

--------------------
Really hope Asar's %CallMacro() issues are fixed.
What did you mean by "rounds 1.5 to 0" then? 1.5 should be rounded up to 2, so the round function is working fine (and your massive macro function you posted in the ASM library thread is useless).
Nevermind, I got it working for my player health patch.

--------------------
Really hope Asar's %CallMacro() issues are fixed.
Pages: « 1 ... 11 12 13 14 15 16 17 »
Forum Index - SMW Hacking - Resource & Tool Releases - Asar: Under new management

The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.

Copyright © 2005 - 2018 - SMW Central
Legal Information - Privacy Policy - Link To Us


Total queries: 23

Menu

Follow Us On

  • Facebook
  • Twitter
  • YouTube

Affiliates

  • Talkhaus
  • SMBX Community
  • GTx0
  • Super Luigi Bros
  • ROMhacking.net
  • MFGG
  • Gaming Reinvented