Some problems Importing modules?

(ndnchief) #1

OK I use Publisher 2.25 & Python 2.2.1, But when ever I run a script that requires RANDOM I get the error in the dos window, RAndom mod not found, My path to Python is correct, c:python22/lib, and I checked lib and the random mod is there. Whats going on, am I being a noob again, I cant figure it out?


(saluk) #2

Well, as an alternative to using random, you can use the function GameLogic.getRandomFloat() to return a random number between 0 and 1.

As for the import problem, 225 seems to have a lot of problems in the realm of python, I think it was sandboxed meaning you cant import anything. I thought this was only for exes and web plugins, but it might be for the blends as well.