SA-MP Forums Archive
error 029: invalid expression, assumed zero - 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)
+--- Thread: error 029: invalid expression, assumed zero (/showthread.php?tid=636500)



error 029: invalid expression, assumed zero - SeifGeny - 28.06.2017

here is the line
0
Код:
if(PlayerInfo[i][pVipLevel] > 0
help please!!


Re: error 029: invalid expression, assumed zero - Fairuz - 28.06.2017

Add ')'


Re: error 029: invalid expression, assumed zero - SeifGeny - 28.06.2017

Where?


Re: error 029: invalid expression, assumed zero - ItzColaBoi - 28.06.2017

Quote:
Originally Posted by SeifGeny
Посмотреть сообщение
Where?
At the end of the code probably..


Re: error 029: invalid expression, assumed zero - SeifGeny - 28.06.2017

Same error


Re: error 029: invalid expression, assumed zero - MrCesar - 28.06.2017

if(PlayerInfo[playerid][pVipLevel] > 0)
try this?


Re: error 029: invalid expression, assumed zero - NoahF - 29.06.2017

Quote:
Originally Posted by MrCesar
Посмотреть сообщение
if(PlayerInfo[playerid][pVipLevel] > 0)
try this?
Yes, that should work. Let us know.


Re: error 029: invalid expression, assumed zero - SeifGeny - 29.06.2017

Same error
This is the whole code

Код:
CMD:vips(playerid, params[])
{
        new vipstring[2000],count=0;
        if(IsPlayerConnected(playerid))
        {
            for (new i = 0; i < MAX_PLAYERS; i++)
            {
                if(IsPlayerConnected(i))
                {
                    if(PlayerInfo[playerid][pVipLevel] > 0)
                    {
                        format(vipstring, sizeof(vipstring),"{ffffff}%s%s (ID:%d)\n", vipstring, PlayerName(i), playerid);
                        count++;
                    }
                }
            }
            ShowPlayerDialog(playerid,DIALOG_VIPS,DIALOG_STYLE_MSGBOX,"{B266FF}Online VIPs:",vipstring,"Close","");
        }
        
         	 if (count == 0)
		     return
			 SendClientMessage(playerid,-1,""chat" There are no VIP's online.");
         	 
          	 return 1;
}



Re: error 029: invalid expression, assumed zero - SeifGeny - 29.06.2017

Or you can just give me a code to show online vips please guys


Re: error 029: invalid expression, assumed zero - MrCesar - 29.06.2017

PHP код:
CMD:vips(playeridparams[])
{
    new 
vipstring[256], count=0;
     if(
IsPlayerConnected(playerid))
    {
         for (new 
0MAX_PLAYERSi++)
           {
             if(
PlayerInfo[playerid][pVipLevel] > 0)
               {
                 
format(vipstringsizeof(vipstring),"{ffffff}%s%s (ID:%d)\n"vipstringPlayerName(i), playerid);
                 
ShowPlayerDialog(playerid,DIALOG_VIPS,DIALOG_STYLE_MSGBOX,"{B266FF}Online VIPs:",vipstring,"Close","");
                 
count++;
               }
        }
        if(
count == 0)
        {
             
SendClientMessage(playerid,-1,"There are no VIP's online.");
         }
     }
     return 
1;

try this
edit: might get some warning written from the browser so let me know