Posted: 19th Dec 2011 5:17
I'm getting some VERY long lines... does IDE have the ability to split lines of code so that it remains readable?

Thanks!
Posted: 19th Dec 2011 5:31
Not as far as I know. Perhaps you should nest your conditions if they are getting a little long.
+ Code Snippet
if x>0 and x<100 and y>0 and y<100 then print("Boo!")

if x>0 and x<100 and y>0 and y<100
 print("Boo!")
endif

if x>0
 if x<100
  if y>0
   if y<100
    print("Boo!")
   endif
  endif
 endif
endif

That shows 3 ways to do the same thing. I may be teaching you to suck eggs, but without more info it's all I can think of.
Posted: 20th Dec 2011 8:55
No... it's more like this:

CreateWeldJoint(WeldJoint,FreeSprite,FixedSprite,getspritex(FixedSprite)+(GetSpriteWidth(FixedSprite)/2),abs(getSpritey(FixedSprite)+GetSpriteHeight(FixedSprite)+getspritey(FreeSprite))/2,0)

But thanks!
Posted: 20th Dec 2011 10:38
You can enable wordwrap in the settings (Settings -> Editor -> General Settings -> other options) but I'm not sure if that is exactly what you're after or if it will work on a line of code like the one you have shown us.
Posted: 20th Dec 2011 14:30
SMS, I raised this as an enhancement some weeks back. At present you cannot do line continuation.

http://forum.thegamecreators.com/?m=forum_view&t=191130&b=41
Posted: 21st Dec 2011 0:07
You could reduce that line down quite a lot if you defined getspritewidth, getspriteheight etc as variables instead. ;p Looks like waiting on the update in the meantime.
Posted: 21st Dec 2011 4:27
Yeah... I could group them and set parts to variables... and then put the variables in the line... but I'm kind of a purest

Also, assigning things to intermediate variables probably takes up memory and eats clock cycles...
Posted: 21st Dec 2011 4:28
If we could just get them to do what Microsoft did with VB/VBA I'd be in heaven...