https://bugs.winehq.org/show_bug.cgi?id=53676
Bug ID: 53676 Summary: vbscript can not exec_script - invalid number of arguments for Randomize Product: Wine Version: 7.16 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: vbscript Assignee: wine-bugs@winehq.org Reporter: jsm174@gmail.com Distribution: ---
While working on leveraging the vbscript engine of Wine for a macos port of Visual Pinball, I've been testing several user made scripts.
I know Global_Randomize is not yet implemented (E_NOTIMPL), but I just came across a script error with "invalid number of arguments":
Option Explicit Randomize
On Error Resume Next
==
Randomize [number]
Randomize uses number to initialize the Rnd function's random-number generator, giving it a new seed value. If you omit number, the value returned by the system timer is used as the new seed value.
===
In global.c, I think the entry should be:
{L"Randomize", Global_Randomize, 0, 0, 1},
instead of
{L"Randomize", Global_Randomize, 0, 1},
https://bugs.winehq.org/show_bug.cgi?id=53676
Jason Millard jsm174@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jsm174@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=53676
Robert Wilhelm sloper42@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sloper42@yahoo.com Ever confirmed|0 |1 Status|UNCONFIRMED |NEW
--- Comment #1 from Robert Wilhelm sloper42@yahoo.com --- Confirming. Global_Rnd has the same issue.
https://bugs.winehq.org/show_bug.cgi?id=53676
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |d2307e415325227a061718fe89e | |d2df6d5cdab7f Resolution|--- |FIXED Status|NEW |RESOLVED
--- Comment #2 from Nikolay Sivov bunglehead@gmail.com --- This is now implemented, marking fixed with d2307e415325227a061718fe89ed2df6d5cdab7f.
https://bugs.winehq.org/show_bug.cgi?id=53676
--- Comment #3 from Jason Millard jsm174@gmail.com --- Thank you for fixing this! It is much appreciated!
https://bugs.winehq.org/show_bug.cgi?id=53676
--- Comment #4 from Nikolay Sivov bunglehead@gmail.com --- (In reply to Jason Millard from comment #3)
Thank you for fixing this! It is much appreciated!
One thing I'm not sure about is 'Randomize' without argument, that's using system clock. It's possible it will be off comparing to Windows, but I'm not sure how to test this reliably.
https://bugs.winehq.org/show_bug.cgi?id=53676
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #5 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 7.21.