Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / split / continue a line in the IDE

Author
Message
SMS
19
Years of Service
User Offline
Joined: 2nd Dec 2004
Location: United States
Posted: 19th Dec 2011 05:17
I'm getting some VERY long lines... does IDE have the ability to split lines of code so that it remains readable?

Thanks!
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 19th Dec 2011 05:31
Not as far as I know. Perhaps you should nest your conditions if they are getting a little long.

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.

SMS
19
Years of Service
User Offline
Joined: 2nd Dec 2004
Location: United States
Posted: 20th Dec 2011 08: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!
Hodgey
15
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 20th Dec 2011 10:38 Edited at: 20th Dec 2011 10:39
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.

Funnell7
13
Years of Service
User Offline
Joined: 8th Sep 2011
Location: UK, England
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
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 21st Dec 2011 00: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.

SMS
19
Years of Service
User Offline
Joined: 2nd Dec 2004
Location: United States
Posted: 21st Dec 2011 04: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...
SMS
19
Years of Service
User Offline
Joined: 2nd Dec 2004
Location: United States
Posted: 21st Dec 2011 04:28
If we could just get them to do what Microsoft did with VB/VBA I'd be in heaven...

Login to post a reply

Server time is: 2024-11-22 20:46:52
Your offset time is: 2024-11-22 20:46:52