I get an underfined error
sum(7,15,0,0,10,95,Str1)
Try 94 then and make sure Str1 exists
Idk what else could be wrong.
ok, now it works, but how do I set it so that people input into it?
It'd be best if you read the docs, but, in short, you'll need to use sum(12,{X},{Y},{datastring} to activate the GUI. Unless you add a button, make sure you add a reminder to press STO-> to finish, since otherwise you can't get out.
Hmm? If you set everything up right it should work... Does your code maybe look like this:
""->Str1
sum(9
sum(7,1,[icon],Title
sum(7,15,1,0,10,94,str1
sum(7,5,[buttons for winbuttons]
sum(12
1. sto does nothing (battery pull time)
2. I am to confused..
What version of DCS are you using?
I think the ability to use STO-> to exit GUI's is rather recent.
Also, I think sto only quits when you are actually using the mouse, not when in a text box (not sure)
ok,ok forget about the sto, I still dont get how to reveive a string input...
Oh yeah, player, I forgot to mention that x.x
As for getting the input, that's what the 3rd argument to sum(12 is for, after X and Y. It takes what string to store the result in.
1 to 9 correspond to Str1 to Str9, and 10 corresponds to Str0.
Just know that either at the beginning or end (I forget which) will be a statplot +
_player1537 wrote:
Also, I think sto only quits when you are actually using the mouse, not when in a text box (not sure)
Correct. Press [2nd] or [TRACE] to leave the text box, then [STO>] to break the mouse.
Edit: Here's a sample code chunk: Code: sum(9
sum(7,1,[icon],Title
sum(7,15,1,0,10,94,str1
sum(7,5,32
sum(12,45,32,5
This will store the results (with some extra stuff) in Str5.
calcdude84se wrote:
Oh yeah, player, I forgot to mention that x.x
As for getting the input, that's what the 3<sup>rd</sup> argument to sum(12 is for, after X and Y. It takes what string to store the result in.
1 to 9 correspond to Str1 to Str9, and 10 corresponds to Str0.
Just know that either at the beginning or end (I forget which) will be a statplot +
Also, if you only use sum(12 , no extra arguments, it will store what you type in into str0
_player1537 wrote:
calcdude84se wrote:
Oh yeah, player, I forgot to mention that x.x
As for getting the input, that's what the 3<sup>rd</sup> argument to sum(12 is for, after X and Y. It takes what string to store the result in.
1 to 9 correspond to Str1 to Str9, and 10 corresponds to Str0.
Just know that either at the beginning or end (I forget which) will be a statplot +
Also, if you only use sum(12 , no extra arguments, it will store what you type in into str0 I strongly, strongly dis-recommend that though. It's not the best idea.
'fraid I don't quite understand. Why shouldn't that be done?
_player1537 wrote:
'fraid I don't quite understand. Why shouldn't that be done?
You end up relying on Doors CS filling in argument defaults, and that might do unexpected things in future versions. I guess it will work for now, though.
In short, the arguments are undefined and, at best, predictable, at worst, random and crashes will ensue.
Edit: ninja'd
ah, ok. Thanks
Qazz, what does the calculator use to send messages back and forth? GetCalc()?
ah, thank you Kerm, now I get it.
calcdude84se wrote:
In short, the arguments are undefined and, at best, predictable, at worst, random and crashes will ensue.
Indeed. Doors CS is careful to initialize all un-filled-in arguments to $20 = 32d, or spaces in ASCII, so you end up starting at (x,y) = (32,32) and Str32. Of course, Doors CS recognizes that there's no such thing as Str32, so it rounds down to Str10 = Str0.
Nice to hear there are at least some idiot-proof measures
(No offence meant, btw)
Good luck, qazz!