#9

10 Errors.

Код:
warning 235: public function lacks forward declaration (symbol "OnFilterScriptInit")
 warning 235: public function lacks forward declaration (symbol "OnPlayerKeyStateChange")
 error 017: undefined symbol "KEY_ACTION"
 error 017: undefined symbol "IsPlayerInAnyVehicle"
 error 001: expected token: "-identifier-", but found "="
 warning 217: loose indentation
 error 017: undefined symbol "MAX_PLAYERS"
 error 017: undefined symbol "PlayAudioStreamForPlayer"
 error 017: undefined symbol "SendClientMessage"
 warning 217: loose indentation
 error 029: invalid expression, assumed zero
 warning 215: expression has no effect
 error 001: expected token: ";", but found "if"
 error 017: undefined symbol "KEY_ACTION"
 fatal error 107: too many error messages on one line
MY codelease help me fix it!+fix radio!

Код:
#define RELEASED(%0) \
    (((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0)))

#define PRESSED(%0) \
    (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
#define vehid
//-------------------------------------------------

public OnFilterScriptInit()
{
    return 1;
}
//-------------------------------------------------

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(PRESSED(KEY_ACTION)) {
        if(IsPlayerInAnyVehicle(playerid))
		{
		new vehid = GetPlayerVehicleID(playerid);
         for(new i = 0; i<MAX_PLAYERS; i++) {
		{
		PlayAudioStreamForPlayer(i, "http://www.radiofg.com/streams/fg.pls");
		SendClientMessage(i, 0xFF330000, "Now Playing: Radio FG");
      }
      else if(RELEASED(KEY_ACTION)) {
      {
		PlayAudioStreamForPlayer(i, "http://www.radiofg.com/streams/fgu.pls");
		SendClientMessage(i, 0xFF330000, "Now Playing: Underground FG");
        }
    }
    return 1;
}
//-------------------------------------------------

public OnPlayerUpdate(playerid)
{
    if(!IsPlayerConnected(playerid)) return 0;
    if(IsPlayerNPC(playerid)) return 1;

    // Handle playing SomaFM at the alhambra
    if(GetPlayerInterior(playerid) == 17) {
        if(IsPlayerInRangeOfPoint(playerid,70.0,489.5824,-14.7563,1000.6797)) { // alhambra middle
            if(!GetPVarInt(playerid,"alhambra")) {
                SetPVarInt(playerid,"alhambra",1);
                PlayAudioStreamForPlayer(playerid, "http://somafm.com/tags.pls",480.9575,-3.5402,1002.0781,40.0,true);
            }
        }
    }
    else {
        if(GetPVarInt(playerid,"alhambra")) {
            DeletePVar(playerid,"alhambra");
            StopAudioStreamForPlayer(playerid);
        }
    }

    return 1;
}
Reply


Messages In This Thread
Help - by Dan_Barocu - 03.01.2012, 17:08
Re: Help - by Dan_Barocu - 03.01.2012, 17:13
Re: Help - by Konstantinos - 03.01.2012, 17:25
Re: Help - by Dan_Barocu - 03.01.2012, 17:36
Re: Help - by Dan_Barocu - 03.01.2012, 17:52
Re: Help - by Dan_Barocu - 03.01.2012, 18:13
Re: Help - by Konstantinos - 03.01.2012, 18:28
Re: Help - by Dan_Barocu - 03.01.2012, 21:24
Re: Help - by Dan_Barocu - 03.01.2012, 21:40
Re: Help - by geerdinho8 - 03.01.2012, 21:48

Forum Jump:


Users browsing this thread: 1 Guest(s)