User Profile

Collapse

Profile Sidebar

Collapse
DaiOz
DaiOz
Last Activity: Nov 19 '09, 05:12 PM
Joined: May 5 '09
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • DaiOz
    replied to object error
    Maybe take a look at the code below in particular,
    Code:
     for (var drawnBall = 0; drawnBall < numberToDraw; drawnBall = drawnBall + 1)
            {
                 var randomNumber = getRandomNumber(sizeOfPool);
      
                 drawnNumbers[drawnBall] = numberPool[getRandomNumber];
      
                 numberPool[getRandomNumber] = numberPool[sizeOfPool - 1];
      
                 sizeOfPool = sizeOfPool
    ...
    See more | Go to post

    Leave a comment:


  • DaiOz
    replied to object error
    Hi mate,
    I know exactly how ya feel lol
    Take a closer look at (aNumber) and then look at the function for lottery draw.
    I'd give you the answer but I cant risk all my hard work so far its been stressfull lol
    See more | Go to post

    Leave a comment:


  • DaiOz
    replied to object error
    I finally cracked this and realized I just needed to remove the else command which you did blatantly say lol
    Thanks for the help again it may take me a while but I get there in the end lol
    See more | Go to post

    Leave a comment:


  • DaiOz
    replied to object error
    I think i've nearly done it, solved the else problem but it will still only check the first 2 inputed numbers, help please :)

    Code:
    function isAlreadySelected(newSelection, previousSelections)
    	{
    
      
           for(var i = 0; i < previousSelections.length; i = i++)
                 {
                     if(newSelection == previousSelections[i])
                         {
    ...
    See more | Go to post

    Leave a comment:


  • DaiOz
    replied to object error
    Im a complete noob at this and was wondering what you meant by a debugger?
    Sorry if im testing your patientence im just trying to get my head around this and find it easier learning from working code but can appreciate your trying to make me learn and discover the answer but I think we could be here some time lol...
    See more | Go to post

    Leave a comment:


  • DaiOz
    replied to object error
    Any hints how this can be done? Ive even resorted to the libary to help lol
    See more | Go to post

    Leave a comment:


  • DaiOz
    replied to object error
    Hi guys,
    Ref the above code as your probably aware im also doing the same course, i've got the above code to work but I find that it will only prompt for a new number if duplicated for the first number and won't check the next 4.
    Any suggestions?

    Code:
    	function isAlreadySelected(newSelection, previousSelections)
    	{
    
      
           for(var i = 0; i < previousSelections.length; i = i + 1)
    ...
    See more | Go to post
    Last edited by acoder; May 10 '09, 03:47 PM. Reason: Added [code] tags + removed full code

    Leave a comment:


  • It's ok I worked through it and found the problem, cheers anyway, I'm sure I'll need your help again soon enough lol
    See more | Go to post

    Leave a comment:


  • Hi im also working on this and after finishing the other part (thanks for your help) I find myself stuck again with this even though he has posted "the working code" I cant get it to work
    See more | Go to post

    Leave a comment:


  • DaiOz
    replied to Help with JavaScript math.round etc
    Thanks for the help guys I don't know how but I made it work the error console tip was great will post code when I get home, cheers again
    See more | Go to post

    Leave a comment:


  • Can u start your own thread please mate
    See more | Go to post

    Leave a comment:


  • DaiOz
    replied to Help with JavaScript math.round etc
    Ah i see what you mean it says 'aNumber' is undefined
    See more | Go to post

    Leave a comment:


  • DaiOz
    replied to Help with JavaScript math.round etc
    I'm typing on my iPhone in work and using notepad to right the script lol
    See more | Go to post

    Leave a comment:


  • DaiOz
    replied to Help with JavaScript math.round etc
    My attempt was as follows;

    Code:
    Function getroundedrandomnumber(aNumber)
    {
    var aNumber = Math.floor(Math.random()*49);
    
    return aNumber;
    }
    Help please lol
    See more | Go to post
    Last edited by Dormilich; May 8 '09, 05:45 AM. Reason: added [code] tags

    Leave a comment:


  • DaiOz
    replied to Help with JavaScript math.round etc
    Hi, any chance of an example of what function code you would use, I'm pretty useless but trying to learn lol
    See more | Go to post

    Leave a comment:


  • DaiOz
    started a topic Help with JavaScript math.round etc

    Help with JavaScript math.round etc

    Hi guys im doing a course which includes some JavaScript and I need help with the following question please,



    The code I have so far is below but I don't think its right please help as I need to complete this part to move onto the next.

    Code:
    <HTML>
    <HEAD>
    <TITLE>M150 TMA 5 : Programming : Task 1 - Testing Math.random()</TITLE>
    
    <SCRIPT language = "JavaScript">
    ...
    See more | Go to post
    Last edited by Dormilich; May 7 '09, 04:15 AM. Reason: added [code] tags

  • DaiOz
    DaiOz posted a Visitor Message for brendanmcdonagh
    Hi Mate im also doing M150 and for the life of me cant get TMA05 code working, any chance o a little help?
    See more | Go to post
No activity results to display
Show More
Working...