garten
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 diff
1.1 --- a/environment.c Wed Jul 23 16:49:10 2008 +0200 1.2 +++ b/environment.c Wed Jul 23 17:14:38 2008 +0200 1.3 @@ -24,12 +24,17 @@ 1.4 1.5 1.6 /* set weather */ 1.7 - sprintf(query, " insert into environment \ 1.8 - (tick, groundwater, slugs, earthworms) \ 1.9 - values ('%d', '%d', '%d', '%d') ", 1.10 - gametime, groundwater, slugs, earthworms); 1.11 + sprintf(query, 1.12 + "insert into environment " 1.13 + "(tick, groundwater, slugs, earthworms) " 1.14 + "values ('%d', '%d', '%d', '%d') " 1.15 + , gametime 1.16 + , groundwater 1.17 + , slugs 1.18 + , earthworms 1.19 + ); 1.20 if (!db_update(query)) { 1.21 - printf("error: environment insertion failed: %s\n", sqlite3_errmsg(db)); 1.22 + db_error("environment insertion"); 1.23 } 1.24 1.25 }