diff environment.c @ 17:5e6c9260913a

lots of cleanups and small fixes
author meillo@marmaro.de
date Wed, 23 Jul 2008 17:14:38 +0200
parents 8db6497d6065
children 5937504619f2
line wrap: on
line diff
--- a/environment.c	Wed Jul 23 16:49:10 2008 +0200
+++ b/environment.c	Wed Jul 23 17:14:38 2008 +0200
@@ -24,12 +24,17 @@
 
 
 	/* set weather */
-	sprintf(query, " insert into environment \
-			(tick, groundwater, slugs, earthworms) \
-			values ('%d', '%d', '%d', '%d') ",
-			gametime, groundwater, slugs, earthworms);
+	sprintf(query,
+			"insert into environment "
+			"(tick, groundwater, slugs, earthworms) "
+			"values ('%d', '%d', '%d', '%d') "
+			, gametime
+			, groundwater
+			, slugs
+			, earthworms
+			);
 	if (!db_update(query)) {
-		printf("error: environment insertion failed: %s\n", sqlite3_errmsg(db));
+		db_error("environment insertion");
 	}
 
 }