why won't this command work - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: why won't this command work (
/showthread.php?tid=217809)
why won't this command work -
yarrum3 - 28.01.2011
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
Re: why won't this command work -
viKKmaN - 28.01.2011
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!");
}