This topic is READ ONLY
kyle7273 (2) [Avatar] Offline
#1
Thanks for helping me with the code, i was up and creating my own game in no time, but is it against the lisence to share the edited code and image files on my website?
warren.sande (211) [Avatar] Offline
#2
Re: Your sking game
Our code (and images) are distributed under the MIT license, which allows you to:
" use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, ... subject to the following conditions:

The <original> copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software."

We include the permission notice by including a link to the MIT License web site in the header comments.

You should leave those original copyright comments there, and then add your own underneath.

There is no problem posting the code or images on your web site.

Your header comments would look something like this:


# kyles_skier.py Copyright Kyle, 2011
#
# Based on skier.py, Copyright Warren Sande, 2009
# Released under MIT license http://www.opensource.org/licenses/mit-license.php
#
# Modified by Kyle. kyles_skier.py is also released under the MIT license.
kyle7273 (2) [Avatar] Offline
#3
Re: Your sking game
i also have this error:
since round is a python command i cant set a vaue fo it without it saying a bunch of stuff so i did this:
rounddd = 015202 and python says it as 6786

and this part is important becuse it powers my savecode system.
any help needed.

Kyle
warren.sande (211) [Avatar] Offline
#4
Re: Your sking game
Kyle,

You were truing to use a variable called 'round'? Yes, that is the name of one of Python's built-in functions, which rounds off a float to the nearest integer.

So, you changed the variable name to 'rounddd'? That should work fine. The reason you're getting this "strange" result is that integers with a leading '0' are interpreted as octal numbers (base smilie in Python.

>>> n = 015202
>>> print n
6786

>>> n = 15202
>>> print n
15202

The leading zero in the first case makes Python think you are trying to set the value of n in octal, not decimal. If you want the decimal value, there are a few things you can do:

a) remove the leading zero

b) do this:
>>> n = int('015202',10)
>>> print n
15202

Hope this helps,


Regards,
Warren Sande