Results 1 to 16 of 16

Thread: "True and" is not needed at line 391

  1. #1
    Join Date
    Oct 2011
    Location
    UK
    Posts
    1,322
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default Not all procedures and functions shown down the side

    New Error

    Not all of my functions and procedures are shown down the side for quick navigation:





    ---Old Error---



    On compiling I am getting the following warnings:

    Code:
    [Warning] (392:17): "True and" is not needed at line 391
    [Warning] (1:1): Calculation always evaluates to True at line 0
    [Warning] (1:1): "and True" is not needed at line 0
    Lime 391:
    Simba Code:
    If((LootBones and PtoLB) or (JustLootBones)) then

    obviously I can't paste line 0 but if you want to see the whole script:
    Last edited by putonajonny; 12-16-2011 at 12:39 AM. Reason: New Error but didn't want to post a new thread

  2. #2
    Join Date
    May 2007
    Location
    Waterloo, Ontario, Canada
    Posts
    1,008
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    I think your structure is a little off... Refer to this example for proper use of 'If' statements with and's/or's.

    http://villavu.com/forum/showthread.php?t=33613

  3. #3
    Join Date
    Oct 2011
    Location
    UK
    Posts
    1,322
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    I still don't have a solution to this, can anybody help, tried Toxins suggestion

  4. #4
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    Simba Code:
    If((LootBones) and (PtoLB)) or (JustLootBones)) then
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


  5. #5
    Join Date
    Oct 2011
    Location
    UK
    Posts
    1,322
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by Camo Developer View Post
    Simba Code:
    If((LootBones) and (PtoLB)) or (JustLootBones)) then
    You have one more closing bracket than opening there but even when correcting that I get the same error

  6. #6
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    Simba Code:
    If(((LootBones) and (PtoLB)) or (JustLootBones)) then

    This?
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


  7. #7
    Join Date
    Oct 2011
    Location
    UK
    Posts
    1,322
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by Camo Developer View Post
    Simba Code:
    If(((LootBones) and (PtoLB)) or (JustLootBones)) then

    This?
    Nope still same error, would my SRL application get rejected because of this? this is in the script I plan to use

  8. #8
    Join Date
    Nov 2010
    Location
    Australia
    Posts
    1,472
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    Quote Originally Posted by putonajonny View Post
    Nope still same error, would my SRL application get rejected because of this? this is in the script I plan to use
    I doubt you will get rejected because of it. Most people don't even test the script thats being tested. And if you do get rejected you'll know how to improve for next time. So don't worry.

  9. #9
    Join Date
    Jan 2008
    Location
    10° north of Hell
    Posts
    2,035
    Mentioned
    65 Post(s)
    Quoted
    164 Post(s)

    Default

    LootBones or the other one is a constant set to True. It's saying "if (True and Bleh)" is not needed, just use "if (Bleh)".

    It's just a warning. Don't worry.

    Dg's Small Procedures | IRC Quotes
    Thank Wishlah for my nice new avatar!
    Quote Originally Posted by IRC
    [22:12:05] <Dgby714> Im agnostic
    [22:12:36] <Blumblebee> :O ...you can read minds

  10. #10
    Join Date
    Oct 2011
    Location
    UK
    Posts
    1,322
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by Dgby714 View Post
    LootBones or the other one is a constant set to True. It's saying "if (True and Bleh)" is not needed, just use "if (Bleh)".

    It's just a warning. Don't worry.
    Ok, LootBones is a Constant where the user can declare whether to Loot Bones in the script or not, should I change it to a Variable and then set it in a part of the script?

    Edit: Done that for that and another boolean and it gets rid of all the errors
    Last edited by putonajonny; 12-16-2011 at 12:04 AM.

  11. #11
    Join Date
    Feb 2007
    Location
    PA, USA
    Posts
    5,240
    Mentioned
    36 Post(s)
    Quoted
    496 Post(s)

    Default

    using a constant is fine.
    You're warned because to the computer it is saying: If true is true then do this:
    The computers like, well why the hell do i need to check if true is true!? :P

    I believe you could use the same method but instead check to see if your constant is true or not true.


    If (constant <> false) then PartyInTheUSA;

    E: not sure, i am kinda rusty, try it though

  12. #12
    Join Date
    Oct 2011
    Location
    UK
    Posts
    1,322
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    Wouldn't
    Simba Code:
    If (constant <> false) then
    do the same thing as
    Simba Code:
    If (constant) then

  13. #13
    Join Date
    Nov 2006
    Posts
    2,369
    Mentioned
    4 Post(s)
    Quoted
    78 Post(s)

    Default

    Quote Originally Posted by putonajonny View Post
    Wouldn't
    Simba Code:
    If (constant <> false) then
    do the same thing as
    Simba Code:
    If (constant) then
    Yup. Atleast if <> applies to booleans. Also same as

    if not (boolean = false) then

    or this:

    if not not boolean then
    Last edited by weequ; 12-16-2011 at 12:42 AM.
    Quote Originally Posted by DeSnob View Post
    ETA's don't exist in SRL like they did in other communities. Want a faster update? Help out with updating, otherwise just gotta wait it out.

  14. #14
    Join Date
    Feb 2007
    Location
    PA, USA
    Posts
    5,240
    Mentioned
    36 Post(s)
    Quoted
    496 Post(s)

    Default

    Quote Originally Posted by putonajonny View Post
    Wouldn't
    Simba Code:
    If (constant <> false) then
    do the same thing as
    Simba Code:
    If (constant) then
    yes

  15. #15
    Join Date
    Oct 2011
    Location
    UK
    Posts
    1,322
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by weequ View Post
    Yup. Atleast if <> applies to booleans. Also same as if not (boolean = false)
    Yeah I am fairly sure that <> works for booleans just that
    Simba Code:
    If(not boolean) then
    is much better than
    Simba Code:
    If(boolean <> true) then
    so I don't think that <> would ever be used

  16. #16
    Join Date
    Feb 2007
    Location
    PA, USA
    Posts
    5,240
    Mentioned
    36 Post(s)
    Quoted
    496 Post(s)

    Default

    Quote Originally Posted by putonajonny View Post
    Yeah I am fairly sure that <> works for booleans just that
    Simba Code:
    If(not boolean) then
    is much better than
    Simba Code:
    If(boolean <> true) then
    so I don't think that <> would ever be used
    ohh, but you know not the powers of <>
    don't ever use it the way i said.

    Use it with other things

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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