Habe nochmal ein kleines Problemchen, MySQL läd Daten nicht richtig aus der Datenbank.
C
public OnGameModeInit(){
MySQL_SetupConnection();
MySQL_LoadServerData();
return 1;
}
stock MySQL_LoadServerData(){
mysql_pquery(dbhandle, "SELECT * FROM `server_data` WHERE 1", "MySQL_@LoadServerData");
return 1;
}
Function MySQL_@LoadServerData(){
new rows;
cache_get_row_count(rows);
if(!rows)return printf("[SERVER DEBUG] Keine MySQL Eintraege! (Function MySQL_@LoadServerData)");
cache_get_value_name(0, "sName: %s", sData[sName]);
cache_get_value_name(0, "sCreateDate: %s", sData[sCreateDate]);
cache_get_value_name(0, "sDeveloper: %s", sData[sDeveloper]);
cache_get_value_name(0, "sVersion: %s", sData[sVersion]);
cache_get_value_name(0, "sGamemodeText: %s", sData[sGamemodeText]);
cache_get_value_name(0, "sRconPassword: %s", sData[sRconPassword]);
cache_get_value_name(0, "sLanguage: %s", sData[sLanguage]);
cache_get_value_name(0, "sMaxNpcs: %s", sData[sMaxNpcs]);
cache_get_value_name(0, "sMaxPlayers: %s", sData[sMaxPlayers]);
cache_get_value_name_int(0, "sInt: %i", sData[sInt]);
printf("sName: %s", sData[sName]);
printf("sCreateDate: %s", sData[sCreateDate]);
printf("sDeveloper: %s", sData[sDeveloper]);
printf("sVersion: %s", sData[sVersion]);
printf("sGamemodeText: %s", sData[sGamemodeText]);
printf("sRconPassword: %s", sData[sRconPassword]);
printf("sLanguage: %s", sData[sLanguage]);
printf("sMaxNpcs: %s", sData[sMaxNpcs]);
printf("sMaxPlayers: %s", sData[sMaxPlayers]);
printf("sInt: %i",sData[sInt]);
return 1;
}
Alles anzeigen
MySQL Datenbank Screen:
server_log.txt: