comparison 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
comparison
equal deleted inserted replaced
16:3c104b5f5158 17:5e6c9260913a
22 slugs = 5; 22 slugs = 5;
23 earthworms = 10; 23 earthworms = 10;
24 24
25 25
26 /* set weather */ 26 /* set weather */
27 sprintf(query, " insert into environment \ 27 sprintf(query,
28 (tick, groundwater, slugs, earthworms) \ 28 "insert into environment "
29 values ('%d', '%d', '%d', '%d') ", 29 "(tick, groundwater, slugs, earthworms) "
30 gametime, groundwater, slugs, earthworms); 30 "values ('%d', '%d', '%d', '%d') "
31 , gametime
32 , groundwater
33 , slugs
34 , earthworms
35 );
31 if (!db_update(query)) { 36 if (!db_update(query)) {
32 printf("error: environment insertion failed: %s\n", sqlite3_errmsg(db)); 37 db_error("environment insertion");
33 } 38 }
34 39
35 } 40 }
36 41
37 42