why won't this command work
#1

i just get a few errors

Код:
C:\Users\Ryan\Desktop\World Wide RolePlay\gamemodes\WWRP.pwn(35084) : error 017: undefined symbol "volume"
C:\Users\Ryan\Desktop\World Wide RolePlay\gamemodes\WWRP.pwn(35085) : error 017: undefined symbol "volume"
C:\Users\Ryan\Desktop\World Wide RolePlay\gamemodes\WWRP.pwn(35090) : error 017: undefined symbol "volume"
Код:
	
if(strcmp(cmd, "/setvolume", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setvolume [amount]");
				return 1;
			}
			volume = strvalEx(tmp);
			if(volume < 0)
			{
				SendClientMessage(playerid, COLOR_GRAD1, "   That is to low !");
				return 1;
			}
			Audio_SetVolume(playerid, Radio[playerid], volume);
		}
		return 1;
	}

EDIT : i have fix it
Reply
#2

replace
pawn Код:
volume = strvalEx(tmp);
if(volume<0)
{
     SendClientMessage(playerid, COLOR_GRAD1, "   That is to low !");
     return 1;
}
with
pawn Код:
if(strvalEx(tmp) < 0)
{
     return SendClientMessage(playerid, COLOR_GRAD1, "   Invalid amount!");
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)