flyhigh427
Member
hi the app still runs the right way ,i just get that error
how would i solve that one?
and if i could ask another question about .
(question 2) how do i write text to a given line number
on an edittext ?
reason i need to save this in a text file on my sdcard im able to do that
just not able to insert at a given line number.
thanks
line #1>>turkey leg 1 2
line #2>>links 2 6
how would i solve that one?
and if i could ask another question about .
(question 2) how do i write text to a given line number
on an edittext ?
reason i need to save this in a text file on my sdcard im able to do that
just not able to insert at a given line number.
thanks
line #1>>turkey leg 1 2
line #2>>links 2 6
Code:
[SIZE=2]
[LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]private[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]void[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] totaltickets() {
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]try[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] {
String holdcost = [/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]hcost[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].getText().toString().trim();
String holdtickets = [/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]gTickets[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].getText().toString().trim();
String holdgas = [/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]hgas[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].getText().toString().trim();
String holdmis = [/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]hmis[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].getText().toString().trim();
String holdkenny1 = [/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]hkenny1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].getText().toString().trim();
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]double[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] mycost,mygas,mymis,mykenny1;
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]double[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] mykenny2;
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]double[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] mybecky;
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]double[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] mytickets;
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]double[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] mychurch;
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]if[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] (holdcost != [/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]""[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]) {
mycost = Integer.[I]parseInt[/I](holdcost);
}[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]else[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]{
mycost=0;
}
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]if[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] (holdtickets != [/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]""[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]) {
mytickets = Integer.[I]parseInt[/I](holdtickets);
}[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]else[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]{
mytickets=0;
}
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]if[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] (holdgas != [/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]""[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]) {
mygas = Integer.[I]parseInt[/I](holdgas);
}[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]else[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]{
mygas=0;
}
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]if[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] (holdmis != [/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]""[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]) {
mymis = Integer.[I]parseInt[/I](holdmis);
}[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]else[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]{
mymis=0;
}
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]if[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] (holdkenny1 != [/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]""[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]) {
mykenny1 = Integer.[I]parseInt[/I](holdkenny1);
}[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]else[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]{
mykenny1=0;
}
mytickets = mytickets - mycost;
mytickets = mytickets - mygas;
mytickets = mytickets - mymis;
mytickets = mytickets + mykenny1;
mychurch = mytickets * .1;
mytickets = mytickets - mychurch;
mybecky = mytickets / 2;
mykenny2 = mybecky;
mykenny2 = mykenny2 - mykenny1;
[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]hcost[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].setText(String.[I]valueOf[/I](holdcost));
[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]hchurch[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].setText(String.[I]valueOf[/I](mychurch));
[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]hbecky[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].setText(String.[I]valueOf[/I](mybecky));
[/SIZE][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]hkenny2[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].setText(String.[I]valueOf[/I](mykenny2));
}
[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]catch[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2](Exception e) {
Log.[I]e[/I]([/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"Error tickets"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"Error tickets"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2], e);
}
}
[/LEFT]
[/SIZE]