16.10.2015, 16:20
Hi guys,
I made stats system(splitted into years and months with MySQL tables). But I have problem after server(automatic) creates tables for businessies(global stats is a one table with 12 rows). So, after server creates tables(on 1st of month or in OnGameModeInit() with MySQL check) then server need to load fields from created tables, but it calls an error. Error says that MySQL table doesn't exist, so I need to restart server because it can't load stuff.
Here's MySQL log
Here's a code for creating, loading and reseting stats(example for business stats)
After I start server, in OnGameMode() server will check is table created, if it's not server will create it with code I gave
I made stats system(splitted into years and months with MySQL tables). But I have problem after server(automatic) creates tables for businessies(global stats is a one table with 12 rows). So, after server creates tables(on 1st of month or in OnGameModeInit() with MySQL check) then server need to load fields from created tables, but it calls an error. Error says that MySQL table doesn't exist, so I need to restart server because it can't load stuff.
Here's MySQL log
Here's a code for creating, loading and reseting stats(example for business stats)
After I start server, in OnGameMode() server will check is table created, if it's not server will create it with code I gave


