PDA

View Full Version : error 012: invalid function call, not a valid address


D3vin
20/10/2013, 06:51 PM
So I help some help in understanding and fix these following errors

warning 219: local variable "SenderName" shadows a variable at a preceding level
error 012: invalid function call, not a valid address
warning 215: expression has no effect
error 001: expected token: ";", but found ")"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line


heres in the following script where im getting the errors

if(GetPVarType(playerid, "pDynamicBBArea"))
{
new SenderName[MAX_PLAYER_NAME];
new string[128];
format(string, sizeof(string), "* %s turn off their boombox.", SenderName(playerid));
SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
foreach(Player, i);
{
if(IsPlayerInDynamicArea(i, GetPVarInt(playerid, "pDynamicBBArea")))
{
StopAudioEx(i);
SendClientMessage(i, COLOR_PURPLE, string);
}
}
DeletePVar(playerid, "pDynamicBBArea");
}
SendClientMessage(playerid, COLOR_WHITE, "You've turn off your boombox");
}
}
return 1;
}