error 021: symbol already defined: "SendRconCommand"
#5

[pawno]stock ChangeHostName()
{
new HostName = 0;//note it always stays zero here // and u forgot to put the end piece of code ;
HostName++;//it always sets the hostname value + 1
if(HostName > 2)//if hostname is 2, which it never becomes it sets the value = zero
{
HostName = 0;
}
switch(HostName)//the number mostlikely is the case
{
case 0: format(string, sizeof(string), "hostname %s", HOSTNAME1);//i guess these are defines.
case 1: format(string, sizeof(string), "hostname %s", HOSTNAME2);//the value that always get picked
case 2: format(string, sizeof(string), "hostname %s", HOSTNAME3);//never gets picked, same goes for case 0
}
SendRconCommand(string);//its not a problem with this code, but the rest. since i expect u to use a_samp. it is already defined, and therefore u cannot use that same functionname for anything else.
return HostName;
}[/pawno]

also u forgot return.
the problem though mostlikely lies within a forward or variable.
not within this piece of code.
Reply


Messages In This Thread
error 021: symbol already defined: "SendRconCommand" - by Think - 23.04.2009, 20:09
Re: error 021: symbol already defined: "SendRconCommand" - by lavamike - 23.04.2009, 20:28
Re: error 021: symbol already defined: "SendRconCommand" - by Donny_k - 23.04.2009, 22:46
Re: error 021: symbol already defined: "SendRconCommand" - by Jefff - 23.04.2009, 23:33
Re: error 021: symbol already defined: "SendRconCommand" - by maij - 24.04.2009, 06:38

Forum Jump:


Users browsing this thread: 3 Guest(s)