User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13

Thread: Expression Too Complex - some details?

  1. #1
    Clicker Multimedia Fusion 2

    Join Date
    Sep 2006
    Location
    Britain, South Coast
    Posts
    1,030
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Expression Too Complex - some details?

    If possible, I'd like to know exactly how MMF decides an expression is too complex.

    I've got a few things worked out. Someone please correct me if these are wrong:

    Strings
    Each string in an expression must have 256 characters or less, not including the delimiting " characters.

    This can be resolved by splitting a long string up, like this:

    "String A" + "String B"

    In this case, both strings A and B can have up to 256 characters, making the a total string of 512. This works from within the same expression.

    Integers
    There appears to be a maximum of 61 integers per expression, assuming no brackets. So if you do 1+1+1+1...+1+1, you can have a total of 61 '1's.

    A set of brackets will take the place of 1 integer


    But it doesn't always seem to fit, so if someone could explain a few more of the rules about long expressions, that'd be dandy

  2. #2
    Clickteam Clickteam
    Jeff's Avatar
    Join Date
    Jun 2006
    Location
    Battle Ground Washington
    Posts
    11,825
    Mentioned
    8 Post(s)
    Tagged
    2 Thread(s)

    Re: Expression Too Complex - some details?

    I believe there is a character limit but Francois would know for sure as this is his area.

  3. #3
    Clicker Multimedia Fusion 2
    SEELE's Avatar
    Join Date
    Jul 2007
    Location
    Terra australis incognito
    Posts
    1,916
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Expression Too Complex - some details?

    very, interesting... and weird.

  4. #4
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Francois's Avatar
    Join Date
    Jul 2006
    Location
    Montpellier, France
    Posts
    6,920
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)

    Re: Expression Too Complex - some details?

    Yes there is a buffer limit (the compiled expression buffer). Can you post your expression? I am surprised that this limit can be reached...

  5. #5
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    Tiles's Avatar
    Join Date
    Jun 2006
    Posts
    1,359
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Expression Too Complex - some details?

    I reach it often at the moment, everytime when i try to soften something by the surrounding knots. 9 Values to calculate. And have posted one example expression before:


  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Jul 2006
    Location
    England
    Posts
    820
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Expression Too Complex - some details?

    I frequently get this problem as well... normally when executing an SQL statement

  7. #7
    No Products Registered

    Join Date
    Jun 2006
    Posts
    625
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Expression Too Complex - some details?

    I get this problem very often with SQL queries too. Maybe having many double and single quotes mixed lead to a problem ?

  8. #8
    Clicker Multimedia Fusion 2

    Join Date
    Sep 2006
    Location
    Britain, South Coast
    Posts
    1,030
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Expression Too Complex - some details?

    It's a very common problem in complex expressions. I use immediate if statements a lot because they help work around object selection problems without fastloops, and this error can be very common once you have nested ifs.

    Another thing you can do is use a nested min() function to retrieve the lower of five or six variables. If each variable is derived in a complex way, it can easily get too much. You end up having to create a bunch of alterable values to handle it.

    But that said, it can still take a long expression. This is valid:

    min((CompareIntegers("Immediate If Object",find(edittext$("Edit Box"),"+",pointer("VARS")),">",-1,find(edittext$("Edit Box"),"+",pointer("VARS")),len(edittext$("Edit Box")))),min((CompareIntegers("Immediate If Object",(find(edittext$("Edit Box"),"-",pointer("VARS"))),">",-1,(find(edittext$("Edit Box"),"-",pointer("VARS"))),len(edittext$("Edit Box")))),min((CompareIntegers("Immediate If Object",(find(edittext$("Edit Box"),"/",pointer("VARS"))),">",-1,(find(edittext$("Edit Box"),"/",pointer("VARS"))),len(edittext$("Edit Box")))),(CompareIntegers("Immediate If Object",(find(edittext$("Edit Box"),"*",pointer("VARS"))),">",-1,(find(edittext$("Edit Box"),"*",pointer("VARS"))),len(edittext$("Edit Box")))))))
    That finds the location of +, -, * or /, whichever comes first in a string.

    Btw, that was generated by Expression Editor Plus, which is designed to help you code complex expressions. I want to know how MMF picks up errors so I can warn about them before exporting the expression.

    EG. If an expression it generates will result in an 'Expression too Complex' error, I'd like to be able to process the string and find out why, and maybe make some suggestions on reducing it. Like "You've used a long string - try containing this in a string object and refering to it like in the following example:..." or "Your expression is simply too complex. MMF has a buffer limit. Would you like to use a wizard to split your expression in two?"

    ...that kinda thing.

  9. #9
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module
    uncleswell's Avatar
    Join Date
    Jan 2007
    Location
    Wilkes-Barre, PA
    Posts
    121
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    sorry to revive a crazy old post... But I still get this all the time. There are ways around it.. but it would certainly be more convenient and make for less-chunky code if this limit can somehow be lifted.

    not a huge deal.. just something that would be nice if possible.

  10. #10
    Clickteam Clickteam
    Danny's Avatar
    Join Date
    Aug 2007
    Location
    United Kingdom
    Posts
    3,016
    Mentioned
    21 Post(s)
    Tagged
    2 Thread(s)
    What's wrong with dumping certain expressions to global strings and then parsing them with the expression editor to save on lengths?!
    Want to learn Clickteam Fusion 2.5?




Page 1 of 2 1 2 LastLast

Similar Threads

  1. Expression too complex?
    By Tiles in forum Multimedia Fusion 2 - Technical Support
    Replies: 27
    Last Post: 11th January 2008, 04:52 PM
  2. "Expression too complex"
    By Nick in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 27th April 2007, 02:39 PM
  3. ODBC expression is too complex message???
    By Wingamez in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 17th August 2006, 09:23 PM
  4. Expression Too Complex
    By Sphax in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 28th July 2006, 01:08 PM

Posting Permissions

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