Internal String length max?

0 favourites
  • 10 posts
From the Asset Store
Support AdType ( AppOpenAd, Banner Ad, Interstitial Ad Rewarded Ad, MREC Ad) support c3 build service
  • Ive been workin on a level editor the last few days and now that its finished enough to start testing in actual use Ive hit a pretty big snag and I cant tell exactly where its comin from.

    Im hittin a limit on the length of a string at 2000 characters. I cant tell if thats the limit of the string inside c2 or the limit of the characters that can be put into the input box of the Dialog Box plugin.

    Ive looked at the plugin code and cant see anywhere that looks like it would effect the that could it could be some general javascript limit as well.

    Anyone have any input that might help?

  • There's always going to be a limit somewhere down the line. Especially since browsers do things differently.

    I'd suggest splitting things up a bit. Put all your x's in one string, y's in another, etc.

    It might also be practical to use whole numbers, without any decimals.

  • yeah Im splitin things up now workin on gettin it all sorted out. It seems the limit is the number the inputbox of the dialog box plugin can display. The len of the string returned fine over 2k but still only 2k in the input box.

    Now I just need to figure out a better way to get the map save data from the app to the user and back again. The only way I know to do it is with the dialog box.

    How else can I save and/or load text during runtime?

  • You might try a variable. Then concatenate the string when you reach a limit.

  • How about creating your own input dialog with a textbox? That's what I'm doing and I have strings nearly 4000 chars long.

  • I just decided to do it with php instead. Since its gonna be on my website anyway I figured might as well

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I'm not aware of any text length limits in either Construct 2's runtime engine or browsers themselves. It's probably more convenient anyway to put it in a project file and AJAX request it anyway. (PHP is overkill for that if you only need a static file.) See Using project files.

  • its not static tho. Its saving/loading the created maps during runtime. Plus the game engine needs to be able to access em too not just the editor. So I went with php. Plus it adds the benefit that no one can read the map files and see everything they shouldnt

  • I believe there is a limit to URI length, depending on browser and webserver. IE (8 and 9), for example, is limited to 2048 characters in the URL or some such. This affects POST and GET requests used by AJAX.

  • I ran into that problem with get and I switched to usin the ajaxpost plugin and it worked fine and has since

    The plain and simple of this is: these just no GOOD way to do it. Period.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)