invalid expression, assumed zero
#1

C:\Users\Wallen\Desktop\LS DM\gamemodes\DBv1.pwn(832) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

PHP код:
    if(pInfo[playerid][Admin] >= && pInfo[playerid][Admin] >= && pInfo[playerid][Admin] >= 0)
    {
    new 
ip[16], country[32];
    
GetIPCountry(ipcountrysizeof country);
    
GetPlayerIp(playerid,ip,sizeof(ip));
    
format(str,sizeof(str), "{c3c3c3}(INFO) %s joined the game (ID: %d || Country: %s )",nameplayeridcountry);
    
SendMessageToAdmins(str);
    }
    else
    {
    new 
ip[16], country[32], isp[32], city[32];
    
GetPlayerIp(playeridip16);
    
GetIPCountry(ipcountrysizeof country);
    
GetIPISP(ipispsizeof isp);
    
GetIPCity(ipcitysizeof city);
    
GetPlayerIp(playerid,ip,sizeof(ip));
    
format(str,sizeof(str), "{c3c3c3}(INFO) %s joined the game (ID: %d || IP: %s || Country: %s || City: %s || ISP: %s)",nameplayeridipcountrycityisp);
    
SendMessageToAdmins(str);
    }
    else
     {
    
format(str,sizeof(str), "{c3c3c3}(INFO) %s (ID: %d) joined the game !",nameplayerid);
    
SendClientMessageToAll(playeridstr);
    } 
Line 832 (LAST ELSE)

PHP код:
else 
Just wanted to specify that if a player is level 1 it will show to the admin only the player's country, level 2 ip countr city isp, level 0 only a normal connection to all players. It gives 1 error on last else.
Reply
#2

How you declare a level of player ?
I mean this :
Код:
pInfo[playerid][Level]
or what ?
Reply
#3

yeah thats the variable which detects if the player has or no the level
Reply
#4

You cant use else twice...
Reply
#5

PHP код:
    if(pInfo[playerid][Admin] >= )
    {
    new 
ip[16], country[32];
    
GetIPCountry(ipcountrysizeof country);
    
GetPlayerIp(playerid,ip,sizeof(ip));
    
format(str,sizeof(str), "{c3c3c3}(INFO) %s joined the game (ID: %d || Country: %s )",nameplayeridcountry);
    
SendMessageToAdmins(str);
    }
    else if (
pInfo[playerid][Admin] >= )
    {
    new 
ip[16], country[32], isp[32], city[32];
    
GetPlayerIp(playeridip16);
    
GetIPCountry(ipcountrysizeof country);
    
GetIPISP(ipispsizeof isp);
    
GetIPCity(ipcitysizeof city);
    
GetPlayerIp(playerid,ip,sizeof(ip));
    
format(str,sizeof(str), "{c3c3c3}(INFO) %s joined the game (ID: %d || IP: %s || Country: %s || City: %s || ISP: %s)",nameplayeridipcountrycityisp);
    
SendMessageToAdmins(str);
    }
    else if (
pInfo[playerid][Admin] >= 0)
     {
    
format(str,sizeof(str), "{c3c3c3}(INFO) %s (ID: %d) joined the game !",nameplayerid);
    
SendClientMessageToAll(playeridstr);
    } 
this should be ok then?
Reply
#6

Do you mean this ? if yes, can you try it

PHP код:
    new ip[16], country[32], isp[32], city[32]; 
    if(
pInfo[playerid][Level] == 1
    { 
       
GetIPCountry(ipcountrysizeof country); 
       
GetPlayerIp(playerid,ip,sizeof(ip)); 
       
format(str,sizeof(str), "{c3c3c3}(INFO) %s joined the game (ID: %d || Country: %s )",nameplayeridcountry); 
       
SendMessageToAdmins(str); 
    } 
    else if(
pInfo[playerid][Level] == 2)
    {
       
GetPlayerIp(playeridip16); 
       
GetIPCountry(ipcountrysizeof country); 
       
GetIPISP(ipispsizeof isp); 
       
GetIPCity(ipcitysizeof city); 
       
GetPlayerIp(playerid,ip,sizeof(ip)); 
       
format(str,sizeof(str), "{c3c3c3}(INFO) %s joined the game (ID: %d || IP: %s || Country: %s || City: %s || ISP: %s)",nameplayeridipcountrycityisp); 
       
SendMessageToAdmins(str); 
    } 
    
format(str,sizeof(str), "{c3c3c3}(INFO) %s (ID: %d) joined the game !",nameplayerid); 
    
SendClientMessageToAll(playeridstr); 
Reply
#7

Ok thanks ill use your code its more simply than mine
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)