Need help with some Errors
#1

Hello all

I founded this audio streamin code what i need but when i put it in a new FS i got 8 erros with invalid funtion ore decloration.

Код:
if(!strcmp(cmdtext, "/sarki", true, 6)) {
	if(!IsPlayerAdmin(playerid)) {
		return SendClientMessage(playerid, 0xFF0000FF, "<!> RCON admin degilsin!");
	}
	if(cmdtext[6] != ' ' || !cmdtext[7]) {
		return SendClientMessage(playerid, 0xFF0000FF, "<!> /sarki [url]");
	}
	for(new i = 0; i < MAX_PLAYERS; ++i) {
		if(IsPlayerConnected(i)) {
			PlayAudioStreamForPlayer(i, cmdtext[7]);
		}
	}
	return 1;
}
Must i put this code special anywhere ore what i do false ?
Reply
#2

Yes, you should put it inside of OnPlayerCommandText callback because if you place it outside of any callback, you will get the invalid function or declaration.
Reply
#3

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
Yes, you should put it inside of OnPlayerCommandText callback because if you place it outside of any callback, you will get the invalid function or declaration.
hmm when i put it there i got 26 errors and many warnings.

can you make me the FS please ?
Reply
#4

As you wish:

http://www.solidfiles.com/d/5ca6b52654/radio.pwn
http://www.solidfiles.com/d/97d2c21a85/radio.amx
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)