invalid expression, assumed zero
#1

42877) : error 029: invalid expression, assumed zero
42877) : error 017: undefined symbol "URL"
42877) : warning 215: expression has no effect
42877) : error 001: expected token: ";", but found "]"
42877) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.

PHP код:
CMD:play(playerid,params[]){
//    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_RED,"This command is only for RCON admins!");
    
if((PlayerInfo[playerid][Level] >= 9)
    {
    new 
URL[250];
    if(
sscanf(params,"s[250]",URL)) return SendClientMessage(playerid,-1,"{39AACC}USAGE: play [URL]");
    for(new 
i=0;i<MAX_PLAYERS;i++)
    {
        if(!
IsPlayerConnected(i)) continue;
         
PlayAudioStreamForPlayer(i,URL);
    }
    
SendClientMessage(playerid,COLOR_RED,"You have played a song for all players!");
    
format(cmdstrsizeof(cmdstr), "Administrator %s (ID:%d) has started the Global Playback of{FFFFFF} %s"FormatName(playerid), playeridURL);
    
SendClientMessageToAll(COLOR_ORANGEcmdstr);
    
SendClientMessageToAll(COLOR_YELLOW"/stop to stop..");
    }
    else return 
SendClientMessage(playeridyellow"Sorry");
    return 
1;

line is:
Код:
new URL[250];
Reply
#2

Quote:
Originally Posted by [HLF]Southclaw
Посмотреть сообщение
`if((PlayerInfo[playerid][Level] >= 9)` count the brackets!

It's a good idea to use a modern IDE such as Sublime, Atom or VS Code which will make it more obvious to you if you have a missing bracket or brace. Check out https://sampforum.blast.hk/showthread.php?tid=531379
fixed thanks you friend +1
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)