![]() |
Onpress
So I got tired of crashing my client. Working on a pretty big file and looking to make my code actually readable.
As far as I know a commonly used practice would be! Code:
Parent.Button.onpress =('say')##(x)Code:
Now what I'm trying to do is |
Quote:
Of course it would be easier to just directly do it like this but that might not have been what you are after: Parent.Button.OnPress='say ' ## (x) ## ' say ' ## (y) |
Your code returns
you say, "test say test2" which was the same problem i was running into previously if i wasn't crashing of course! For the record that was definitely pseudo code to help understand what i was trying to do. I need a line return so when it presses it thinks that its a slue of commands. |
Oh lol yeah sorry did that in a hurry, you can't just separate different /say commands via a space because it thinks that's still part of the text you want to say, so in this case you would need to use the = notation. Also I got the order wrong. So the correct line without a linebreak would be:
Parent.Button.OnPress='say ' ## (y) ## ' say ' ## (y) ## ' say ' ## (x) ## ' say ' ## (x)But I thought so that your question was mainly directed at the linebreak anyway. |
Basically instead of doing
ONPRESS= BLAH BLAH Press=true ONPRESS= BLAH BLAH Press=true ONPRESS= BLAH BLAH Press=true ONPRESS= BLAH BLAH Press=true ONPRESS= BLAH BLAH Press=true ONPRESS= BLAH BLAH Press=true ONPRESS= BLAH BLAH Press=true I was trying to see if its possible to add line breaks so I could do ONPRESS= BLAH BLAH ONPRESS= ONPRESS + LINEBREAK + BLAH BLAH ONPRESS= ONPRESS + LINEBREAK + BLAH BLAH ONPRESS= ONPRESS + LINEBREAK + BLAH BLAH Press=true Which I gave up on for the moment but if its possible would cut down on code emmensly |
Yes you can, sorry if that didn't become clear above. For example in my code I usually add an element CRLF to the xml which is the linebreak characters and then my code I just XX.OnPress=(code1) ## CRLF ## (code2) ## CLRF ## (code3) ## ...
|
I tried doing that by creating a variable="
" then put it there could you put a more exact example because everything I tried just crashed me.
|
if you tried that runtime it won't work, if you put it in the xml that will work. Or just put it in the XML like this:
CRLF="That's what I did before we had the entities. |
HUMM that was one of the first things I tried Ill go back and do it again after raids, thanks.
|
| All times are GMT -5. The time now is 06:26 PM. |
vBulletin® - Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
© MMOUI