From 1d4chan
Revision as of 17:33, 7 April 2019 by Sudoman (talk | contribs) (answered question about how to run the Python3 code on this wiki page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Ive added Python code to replace the JavaScript that doesnt work. Heres the Githhub if anyone cares: It could definately do with some improvement --Special:Contributions/

The javascript does work, but it doesn't check if you entered an empty string as the # of hitdice. Your Python code leaves '.0' lying around. Fixing. --NotBrandX (talk) 15:31, 13 April 2018 (UTC)
Cheers, do you mind if I steal your better code for my GitHub?

how do you use the javascript code?[edit]

unclear how you make the code work, can someone explain whats required to run this thanks.

Running code from a wiki without auditing the code is rather dangerous because malicious actors can add malware to the code at some point in the future. I would read the code to make sure that it's not doing anything like accessing your filesystem or the network. The python code is easier to understand, and right now it appears to be fine.
The way to run the code is to copy the text into a file like and then run: python3 You'll need to install some version of Python3 to run the code. -- Sudoman (talk) 17:33, 7 April 2019 (UTC)