I'm trying to add the second argument as a variable, but it seems it has to be an array. How to fix this with a variable? Should i use formatex?
EDIT:
PHP Code:
new config[33] = "votemap.cfg"
PHP Code:
public Cmd_WriteFile() {
new szTemp[555 char]
formatex(szTemp, charsmax(szTemp), "TotalVotes: %i", iTotalVotes)
write_file(config, szTemp, -1)
formatex(szTemp, charsmax(szTemp), "Average of Total Votes: %i/5", Average)
write_file(config, szTemp, -1)
formatex(szTemp, charsmax(szTemp), "Map: %s", szMap)
write_file(config, szTemp, -1)
}
Something like this or can i optimize this a lot more?
__________________