Flash Website Builder- Trendy Site Builder is a Flash Site Building tool that helps users build stunning websites. Check Out Custom Custom Logo Design by LogoBee. Website Design and Free Logo Templates available.
 CodingForums.com Program doesn't work, it's urgent! :D

Before you post, read our: Rules & Posting Guidelines

Enjoy an ad free experience by logging in. Not a member yet? Register.
 01-14-2013, 07:18 PM PM User | #1 triko New Coder   Join Date: Oct 2012 Location: Italy Posts: 72 Thanks: 3 Thanked 0 Times in 0 Posts Program doesn't work, it's urgent! :D Hi guy, i'm writing by 13 o'clock, and now don t works can you help!!! My problem is with, Column and Dozen, that return an NaN... I must to deliver at 22:30, please solve my problem Code: ``` Roulette ```
 01-14-2013, 07:19 PM PM User | #2 triko New Coder   Join Date: Oct 2012 Location: Italy Posts: 72 Thanks: 3 Thanked 0 Times in 0 Posts This is the second part to insert in body Code: ```
3
6
9
12
15
18
21
24
27
30
33
36
1st Line
0
2
5
8
11
14
17
20
23
26
29
32
35
2nd Line
1
4
7
10
13
16
19
22
25
28
31
34
3rd Line
1st 12
2nd 12
3rd 12
1 - 18
Even
Red
Black
Odd
19 - 36

\$\$

```
 01-14-2013, 10:27 PM PM User | #3 Goos New Coder   Join Date: Apr 2011 Posts: 47 Thanks: 0 Thanked 13 Times in 12 Posts If you comment out all checks and then add them one by one. You'll find that the problem lies within your manque and passe functions, instead of your dozen and column functions. You can easily fix them by adding a check for an empty string, like you do in your black, red, even and odd functions. Another thing I noticed is way of getting a random number. Math.random gives a number in the range [0, 1). So from 0 up to but including 1. That means: 0 <= (Math.random() * 36) < 36 0 <= Math.floor(Math.random() * 36) <= 35 So your code will give an integer in from 0 to 35, instead of 1 to 36. You can use the following function to get a random number within a certain range. Code: ```function random(min, max){ Math.floor(Math.random() * (max - min + 1)) + min; };```
 01-15-2013, 01:22 AM PM User | #4 Old Pedant Supreme Master coder!     Join Date: Feb 2009 Posts: 24,968 Thanks: 75 Thanked 4,310 Times in 4,277 Posts Since this appears to be for a roulette wheel, that means that it will have spaces numbered from 0 (ZERO!) to 36. [In the USA, it would "00" and "0" and 1 to 36.] So I think what he really wants is Code: `var ball = Math.floor(Math.random()*37); // get a number from 0 to 36` __________________ An optimist sees the glass as half full. A pessimist sees the glass as half empty. A realist drinks it no matter how much there is.

 Bookmarks

 Thread Tools Rate This Thread Rate This Thread: 5 : Excellent 4 : Good 3 : Average 2 : Bad 1 : Terrible

 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 Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home :: Client side development     JavaScript programming         DOM and JSON scripting         Ajax and Design         JavaScript frameworks         Post a JavaScript     HTML & CSS     XML     Flash & ActionScript         Adobe Flex     Graphics and Multimedia discussions     General web building         Site reviews         Building for mobile devices :: Server side development     Apache configuration     Perl/ CGI     PHP         Post a PHP snippet     MySQL         Other Databases     Ruby & Ruby On Rails     ASP     ASP.NET     Java and JSP     Other server side languages/ issues         ColdFusion         Python :: Computing & Sciences     Computer Programming     Computer/PC discussions     Geek News and Humour Web Projects and Services Marketplace     Web Projects         Small projects (quick fixes and changes)         Medium projects (new script, new features, etc)         Large Projects (new web application, complex features etc)         Unknown sized projects (request quote)         Vacant job positions         Looking for work/ for hire         Project collaboration/ partnership         Paid work offers and requests (Now CLOSED)     Career, job, and business ideas or advice     Domains, Sites, and Designs for sale         Domains for sale         Websites for sale         Design templates and graphics for sale :: Other forums     Member Offers     Forum feedback and announcements

All times are GMT +1. The time now is 12:27 AM.