Page 2 of 2 FirstFirst 1 2
Results 11 to 19 of 19

Thread: Grief's Scripts,

  1. #11
    aaaaaaaaaaaaaaaaaaaaaaaaa Grief Hero's Avatar
    Join Date
    Jun 2013
    Location
    n/a
    Posts
    1,327
    Quote Originally Posted by John View Post
    There is so much I don't know where to get started...

    for example:
    PHP Code:
    while(uk+1<=ans) {
          
    uk++;
          
    solve uk;
          
    sleep(0.05);
          if (
    ans/uk=thing) { //replace the / with the mathematical symbol you require.
             
    echo("The answer is" SPC uk);
          }
        } 
    What's the point of having sleep() and what is solve = * used for?

    Plus, in the java code, why did you use float? You're adding an integer on each, this is not the solution, preferably it's better if you use a mathematical equation and not loop through numbers... What if an answer was decimal? Code won't help you here.
    I used int at first, but as an int is a whole number, it's incapable of doing decimals, but float can. I remember using solve for something, but I removed it. Sleep is so RC doesn't freeze. I'm sorry that it isn't perfect, as this is my first partially-logical script. And Noofboy, it can be used anywhere ex. k= "hi" SPC "bye";


    I saw. I conquered. I came.


  2. #12
    Street Boss John's Avatar
    Join Date
    Jun 2013
    Location
    Lebanon
    Posts
    825
    Quote Originally Posted by Grief Hero View Post
    I used int at first, but as an int is a whole number, it's incapable of doing decimals, but float can. I remember using solve for something, but I removed it. Sleep is so RC doesn't freeze. I'm sorry that it isn't perfect, as this is my first partially-logical script. And Noofboy, it can be used anywhere ex. k= "hi" SPC "bye";
    But you're not adding decimals at it, you're adding integers...
    -Johnaudi

  3. #13
    aaaaaaaaaaaaaaaaaaaaaaaaa Grief Hero's Avatar
    Join Date
    Jun 2013
    Location
    n/a
    Posts
    1,327
    Quote Originally Posted by John View Post
    But you're not adding decimals at it, you're adding integers...
    Instead of changing int to float each time I need to use a decimal number, I just kept it at float. What's wrong with that?


    I saw. I conquered. I came.


  4. #14
    Street Boss John's Avatar
    Join Date
    Jun 2013
    Location
    Lebanon
    Posts
    825
    Quote Originally Posted by Grief Hero View Post
    Instead of changing int to float each time I need to use a decimal number, I just kept it at float. What's wrong with that?
    val++; adds one integer, not 0.001.

    What if the answer was 0.002342154324? This isn't the best way to do that.
    -Johnaudi

  5. #15
    aaaaaaaaaaaaaaaaaaaaaaaaa Grief Hero's Avatar
    Join Date
    Jun 2013
    Location
    n/a
    Posts
    1,327
    I tried adding 0.01 several times, but I kept getting errors. I used uk+0.01;


    I saw. I conquered. I came.


  6. #16
    Street Boss John's Avatar
    Join Date
    Jun 2013
    Location
    Lebanon
    Posts
    825
    Quote Originally Posted by Grief Hero View Post
    I tried adding 0.01 several times, but I kept getting errors. I used uk+0.01;
    uk += 0.01; or uk = uk + 0.01; should do the trick.
    -Johnaudi

  7. #17
    aaaaaaaaaaaaaaaaaaaaaaaaa Grief Hero's Avatar
    Join Date
    Jun 2013
    Location
    n/a
    Posts
    1,327
    Quote Originally Posted by John View Post
    uk += 0.01; or uk = uk + 0.01; should do the trick.
    I thought of that, but didn't do it because I thought it wouldn't work, and thanks!


    I saw. I conquered. I came.


  8. #18
    What are all these numbers and letters and symbols! I don't even know whats Scripting is!

    ╰( ͡° ͜ʖ ͡° )つ──☆*:・゚


  9. #19
    Veteran Wolverine8888's Avatar
    Join Date
    Jun 2013
    Location
    Philippines
    Posts
    315
    Quote Originally Posted by Exfuzion Yaggelo View Post
    What are all these numbers and letters and symbols! I don't even know whats Scripting is!
    Math! Which many people hates
    Need Help? or Questions?
    Just Ask me and I will give the answer right away
    Want to skype with me? wolverine_graal
    ~Gani Artist

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •