Can someone explain what I have done wrong, and how I could fix it?
And what about ; ?
When it's needed in pawn?
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <csx>
new String:command[] = "gal_startvote"; //Command witch is executed when team has winscores.
new String:winningMsg[] = "";
new CTKILLS = 0;
new TKILLS = 0;
new winscores = 10;
/*
enum winningteam {
CT = 0,
T = 1,
TIE = 2
}
*/
new winningteam = 0;
public plugin_init() {
register_plugin("DeathMach Win", "1.0.0", "Jonuz")
register_clcmd("/status", "scoreStatus")
register_clcmd("/winning", "informer")
}
public getKills(attacker) {
if (cs_get_user_team(attacker) == CS_TEAM_CT) {
CTKILLS++
}
if (cs_get_user_team(attacker) == CS_TEAM_T) {
TKILLS++
}}
public scoreStatus(id) {
client_print (id,print_chat, "Ct have: %CTKILLS kills.")
client_print (id,print_chat, "Terrorist have: %TKILLS kills.")
}
public Win() {
if (CTKILLS == winscores) {
server_print ("Counter terrorist team has won game.")
server_cmd ("gal_startvote")
}
if (TKILLS == winscores) {
server_print ("Terrorist steam has won game.")
server_cmd (command)
}}
public informer () {
if (CTKILLS < TKILLS) {
winningteam = 0
} else if (CTKILLS > TKILLS) {
winningteam = 1
} else if (CTKILLS == TKILLS) {
winningteam = 2
}
if (winningteam = 0) {
winningMsg = "Ct needs winscores - CTKILLS kill to win game.";
} else if (winningteam = 1) {
winningMsg = "Terrorist team need winninscores - TKILLS kill to win game.";
}
server_print (winningMsg)
winningMsg = "";
}
Compile error:
Code:
csdmwin.sma(7) : warning 213: tag mismatch
csdmwin.sma(8) : warning 213: tag mismatch
csdmwin.sma(51) : warning 213: tag mismatch
csdmwin.sma(64) : warning 211: possibly unintended assignment
csdmwin.sma(65) : error 047: array sizes do not match, or destination array is too small
csdmwin.sma(66) : warning 211: possibly unintended assignment
csdmwin.sma(67) : error 047: array sizes do not match, or destination array is too small
csdmwin.sma(70) : warning 213: tag mismatch
csdmwin.sma(71) : warning 213: tag mismatch
csdmwin.sma(73) : warning 204: symbol is assigned a value that is never used: "winningteam"
__________________