The error says something like (near "create": syntax error) when preparing 'create table option... create table score... I'll just post all other codes in my program so that I can ask whenever there's more problem encountered.
This is my table (in DBHelper.java):
final static String sqlcreate=
"create table option (id integer primary key autoincrement," +
"volume boolean not null, vibrate boolean not null, theme text not null) " +
"create table score (id integer primary key autoincrement," +
"score text not null, difficulty text not null, date date not null, );";
This is my DBFunction.java:
public int addScore(String score, String difficulty){
ContentValues values = new ContentValues();
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
Date scoredate = new Date();
values.put("score", score);
values.put("difficulty", difficulty);
values.put("date", dateFormat.format(scoredate));
return (int) db.insert(tableScore, null, values);
}`
And this is my OnClick():
if (v==btnadd){
String vol = tbtnvol.getText().toString();
String vib = tbtnvib.getText().toString();
String theme = themename.getText().toString();
options.open();
options.addOption(vol, vib, theme);
options.close();
Toast.makeText(this, "Data has been added", Toast.LENGTH_LONG).show();
}`