Jump to content
  • 0

Problema


andrew2012

Question

Nick: andrew2012

Problema: pai am facut un script de radio, si im ida eroare la compilare

Erori / warnings: C:\Users\Andrei\Desktop\radio\radio.pwn(43) : warning 215: expression has no effect

C:\Users\Andrei\Desktop\radio\radio.pwn(49) : warning 217: loose indentation

C:\Users\Andrei\Desktop\radio\radio.pwn(51) : warning 215: expression has no effect

C:\Users\Andrei\Desktop\radio\radio.pwn(59) : warning 217: loose indentation

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

4 Warnings.

Lini/script: [pawn]#include <a_samp>

#define FILTERSCRIPT

#define COLOR_LIGHTBLUE 0x33CCFFAA

#define COLOR_WHITE 0xFFFFFFAA

#define COLOR_PINK 0xFFC0CBAA

#define COLOR_RED 0xAA3333AA

#define PlayAudioStreamForPlayer

#define StopAudioStreamForPlayer

public OnFilterScriptInit()

{

        print("\n--------------------------------------");

        print(" Radio Script");

        print("--------------------------------------\n");

        return 1;

}

main()

{

        print("\n----------------------------------");

        print(" Radio Script");

        print("----------------------------------\n");

}

public OnPlayerCommandText(playerid, cmdtext[])

{

        if(strcmp("/radioinfo", cmdtext, true, 10) == 0)

{

        SendClientMessage(playerid, COLOR_LIGHTBLUE, "~=~=~=~=~=~=~=~=~=~= Radio Information [RO] ~=~=~=~=~=~=~=~=~=~=");

        SendClientMessage(playerid, COLOR_WHITE, "Daca vrei sa asculti radio, scrie /radioon");

        SendClientMessage(playerid, COLOR_WHITE, "Daca vrei sa opresti radio, scrie /radiooff");

        SendClientMessage(playerid, COLOR_LIGHTBLUE, "~=~=~=~=~=~=~=~=~=~= Radio Information [ENG] ~=~=~=~=~=~=~=~=~=~=");

        SendClientMessage(playerid, COLOR_WHITE, "If you want to listen radio, type /radioon");

        SendClientMessage(playerid, COLOR_WHITE, "If you want to stop radio, type /radiooff");

        return 1;

}

        if (strcmp("/radiooff", cmdtext, true, 10) == 0)

{

        StopAudioStreamForPlayer(playerid);

        SendClientMessage(playerid, 0xAA3333AA, "RO:  Ai oprit radioul.");

        SendClientMessage(playerid, 0xAA3333AA, "ENG: You have stopped the radio.");

        return 1;

}

      if (strcmp("/radioon", cmdtext, true) == 0)

{

        PlayAudioStreamForPlayer(playerid, "http://stream.playmusicfm.info:9000/");

        SendClientMessage(playerid, 0xFFFFFFAA, "Type /Radio off to stop audio streaming.");

        return 1;

}

        return 0;

}[/pawn]

Ai incercat sa rezolvi singur ?: nu, nu ma descurc, sunt incepator

site-logo.gif

188.241.63.148:7777

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Incearca asa:

[pawn]public OnPlayerCommandText(playerid, cmdtext[])

{

if(strcmp("/radioinfo", cmdtext, true, 10) == 0)

{

SendClientMessage(playerid, COLOR_LIGHTBLUE, "~=~=~=~=~=~=~=~=~=~= Radio Information [RO] ~=~=~=~=~=~=~=~=~=~=");

SendClientMessage(playerid, COLOR_WHITE, "Daca vrei sa asculti radio, scrie /radioon");

SendClientMessage(playerid, COLOR_WHITE, "Daca vrei sa opresti radio, scrie /radiooff");

SendClientMessage(playerid, COLOR_LIGHTBLUE, "~=~=~=~=~=~=~=~=~=~= Radio Information [ENG] ~=~=~=~=~=~=~=~=~=~=");

SendClientMessage(playerid, COLOR_WHITE, "If you want to listen radio, type /radioon");

SendClientMessage(playerid, COLOR_WHITE, "If you want to stop radio, type /radiooff");

return 1;

}

if (strcmp("/radiooff", cmdtext, true, 10) == 0)

{

StopAudioStreamForPlayer(playerid);

SendClientMessage(playerid, 0xAA3333AA, "RO:  Ai oprit radioul.");

SendClientMessage(playerid, 0xAA3333AA, "ENG: You have stopped the radio.");

return 1;

}

if (strcmp("/radioon", cmdtext, true) == 0)

{

PlayAudioStreamForPlayer(playerid, "http://stream.playmusicfm.info:9000/");

SendClientMessage(playerid, 0xFFFFFFAA, "Type /Radio off to stop audio streaming.");

return 1;

}

return 0;

}[/pawn]

Acele if'uri si parantezele " { " sau " } " trebe sa fie alianite corect, una sub alta..deci ai grija la TAB'uri.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.