Welcome to the BF Forums! Register Now, It's Free!

Welcome to the BF Forums; your source for the latest and greatest video game news, strategies, discussions, and resources. Join over 60,000 like-minded gamers from around the world to chat about your interests in our community.

You are currently viewing the forums as a guest user, which limits your access to certain content, contests, downloads, and more. By joining our free community, you will be able to respond in discussions/articles, contact members privately (PM), participate in regular-scheduled contests, see less advertisements, and have access to many other features. Registration is quick, easy, and completely free.

Have your questions answered. Share your thoughts about a topic. Take 2 minutes, Register Now!
BattleForums.com Forums > General > Chit Chat

Reply
 
Thread Tools Display Modes
Old 02-26-2008, 08:27 PM   #1 (permalink)
Respected Member
 
Emperor Pan I's Avatar
 
Join Date: Aug 2002
Location: Canada
Age: 20
Posts: 11,410
Python problem

I can't generate any random numbers in Python. I think I'm semi-retarded, but I know I've imported random, but randint() and the other random functions aren't working properly.
__________________

Watch the Game, Learn the Game, Control the Game.
To Those Who Think,
To Those Who Dare,
To Those Who Do,
To Those Who Succeed.
Success is nothing more than taking advantage of an opportunity.


Quote:
Mapmaker FAQ:

1)Can the map editor-

Yes, it can.
Emperor Pan I is online now   Reply With Quote
Old 02-26-2008, 08:36 PM   #2 (permalink)
o
 
Jenny's Avatar
 
Join Date: May 2003
Posts: 3,534
Re: Python problem

.
Jenny is offline   Reply With Quote
Old 02-26-2008, 08:59 PM   #3 (permalink)
[ Official Forum Ninja ]
 
Ninja_Blue's Avatar
 
Join Date: Sep 2006
Location: Roanoke VA
Posts: 1,404
Re: Python problem

Omg. AH IT'S A SNAKE! RUUUUN!
__________________
Xenocult
Ninja_Blue is offline   Reply With Quote
Old 02-27-2008, 09:13 AM   #4 (permalink)
Aya Matsuura is awesome
 
x42bn6's Avatar
 
Join Date: Nov 2002
Location: Trieste, Friuli-Venezia Giulia
Age: 20
Posts: 14,942
Re: Python problem

Try using seed() to seed the generator with the system time before you call any random functions.*
__________________
* Hang on a second...

Diablo III has been announced!

Here's what you need to do: Register a new account and tell the world what you think of this game.

Tell the damned world. The world wants to know.
x42bn6 is online now   Reply With Quote
Old 02-27-2008, 04:15 PM   #5 (permalink)
Respected Member
 
Emperor Pan I's Avatar
 
Join Date: Aug 2002
Location: Canada
Age: 20
Posts: 11,410
Re: Python problem

when i use seed I get. "AttributeError: 'module' object has no attribute 'seed'"
__________________

Watch the Game, Learn the Game, Control the Game.
To Those Who Think,
To Those Who Dare,
To Those Who Do,
To Those Who Succeed.
Success is nothing more than taking advantage of an opportunity.


Quote:
Mapmaker FAQ:

1)Can the map editor-

Yes, it can.
Emperor Pan I is online now   Reply With Quote
Old 02-27-2008, 11:11 PM   #6 (permalink)
Aya Matsuura is awesome
 
x42bn6's Avatar
 
Join Date: Nov 2002
Location: Trieste, Friuli-Venezia Giulia
Age: 20
Posts: 14,942
Re: Python problem

And I have no idea what you are talking about because I don't program in Python.*
__________________
* Hang on a second...

Diablo III has been announced!

Here's what you need to do: Register a new account and tell the world what you think of this game.

Tell the damned world. The world wants to know.
x42bn6 is online now   Reply With Quote
Old 02-27-2008, 11:34 PM   #7 (permalink)
Respected Member
 
Emperor Pan I's Avatar
 
Join Date: Aug 2002
Location: Canada
Age: 20
Posts: 11,410
Re: Python problem

damnit!

I ****ing hate this language.
__________________

Watch the Game, Learn the Game, Control the Game.
To Those Who Think,
To Those Who Dare,
To Those Who Do,
To Those Who Succeed.
Success is nothing more than taking advantage of an opportunity.


Quote:
Mapmaker FAQ:

1)Can the map editor-

Yes, it can.
Emperor Pan I is online now   Reply With Quote
Old 02-28-2008, 07:09 AM   #8 (permalink)
Respected Member
 
Emperor Pan I's Avatar
 
Join Date: Aug 2002
Location: Canada
Age: 20
Posts: 11,410
Re: Python problem

Quote:
Originally Posted by Emperor Pan I View Post
damnit!

I ****ing hate this language.
okay never mind the damn IDE didn't import all the libraries, as I noticed random.py wasn't listed, so i manually added it and now random works. I still hate this damn language.

EDIT

didn't mean to double post, meant to edit not quote. It is way to early and im way to tired for this ****.
__________________

Watch the Game, Learn the Game, Control the Game.
To Those Who Think,
To Those Who Dare,
To Those Who Do,
To Those Who Succeed.
Success is nothing more than taking advantage of an opportunity.


Quote:
Mapmaker FAQ:

1)Can the map editor-

Yes, it can.
Emperor Pan I is online now   Reply With Quote
Reply

« Math Problem | A video I made for youtube (Anime parody, sort of) »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


All times are GMT -4. The time now is 05:34 AM.



Powered by vBulletin® Version 3.7.2 | Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0