01.02.2015, 02:46
What's wrong with the line?
I have this error: error 029: invalid expression, assumed zero
Код:
if(P_Data[i;[pAdmin] > 0) {
if(P_Data[i;[pAdmin] > 0) {
if(P_Data[i][pAdmin] > 0)
{
C:\Users\blank\Documents\Personal Things\GTA files\GTA SA files\SAMP\filterscripts\ycmd.pwn(64) : error 029: invalid expression, assumed zero C:\Users\blank\Documents\Personal Things\GTA files\GTA SA files\SAMP\filterscripts\ycmd.pwn(64) : warning 215: expression has no effect C:\Users\blank\Documents\Personal Things\GTA files\GTA SA files\SAMP\filterscripts\ycmd.pwn(64) : error 001: expected token: ";", but found "]" C:\Users\blank\Documents\Personal Things\GTA files\GTA SA files\SAMP\filterscripts\ycmd.pwn(64) : error 029: invalid expression, assumed zero C:\Users\blank\Documents\Personal Things\GTA files\GTA SA files\SAMP\filterscripts\ycmd.pwn(64) : fatal error 107: too many error messages on one line
YCMD:ask(playerid, params[], help) { #pragma unused help new string[128], text[48]; if(sscanf(params, "s[48]", text)) return SCM(playerid, COLOR_RED, "Usage: /ask [Text]"); foreach(Player, i) { if(P_Data[i][pAdmin] > 0) { format(string,sizeof(string),""COL_RED"[Question] Player"COL_WHITE"%s |"COL_RED"Text: "COL_WHITE"%s ",GetName(playerid),text); SCM(i,-1,string); AskLog(playerid,text);} } return 1; }
CMD:ask(playerid,params[])
{
new str[80];
if(sscanf(params,"s[80]",str)) return SendClientMessage(playerid,red,"Usage : /ask [text]");
new name[MAX_PLAYER_NAME],msg[110];
GetPlayerName(playerid,name,20);
format(msg,sizeof(msg),"[Question]: %s(%d) : %s",name,playerid,str);
for(new i=0;i<MAX_PLAYERS;++i)
{
if(IsPlayerConnected(i) && (pAdmin[i] >= 1 || IsPlayerAdmin(i)))
SendClientMessage(i,ann,msg);
}
SendClientMessage(playerid,COLOR_BABYGREEN, "You have asked a question, please wait for a response.");
return 1;
}
C:\Users\blank\Documents\Personal Things\GTA files\GTA SA files\SAMP\filterscripts\ycmd.pwn(66) : error 029: invalid expression, assumed zero C:\Users\blank\Documents\Personal Things\GTA files\GTA SA files\SAMP\filterscripts\ycmd.pwn(66) : error 029: invalid expression, assumed zero C:\Users\blank\Documents\Personal Things\GTA files\GTA SA files\SAMP\filterscripts\ycmd.pwn(66) : error 029: invalid expression, assumed zero
CMD:ask(playerid,params[]) { new str[80]; if(sscanf(params,"s[80]",str)) return SendClientMessage(playerid,COLOR_RED,"Usage : /ask [text]"); new name[MAX_PLAYER_NAME],msg[110]; GetPlayerName(playerid,name,20); format(msg,sizeof(msg),"[Question]: %s(%d) : %s",name,playerid,str); for(new i=0;i<MAX_PLAYERS;++i) { if(IsPlayerConnected(i) && (pAdmin[i] >= 1 || IsPlayerAdmin(i))) SendClientMessage(i,ann,msg); } SendClientMessage(playerid,COLOR_BABYGREEN, "You have asked a question, please wait for a response."); return 1; }
I did it and 4 errors came out:
Код:
C:\Users\blank\Documents\Personal Things\GTA files\GTA SA files\SAMP\filterscripts\ycmd.pwn(66) : error 029: invalid expression, assumed zero C:\Users\blank\Documents\Personal Things\GTA files\GTA SA files\SAMP\filterscripts\ycmd.pwn(66) : error 029: invalid expression, assumed zero C:\Users\blank\Documents\Personal Things\GTA files\GTA SA files\SAMP\filterscripts\ycmd.pwn(66) : error 029: invalid expression, assumed zero Код:
CMD:ask(playerid,params[]) { new str[80]; if(sscanf(params,"s[80]",str)) return SendClientMessage(playerid,COLOR_RED,"Usage : /ask [text]"); new name[MAX_PLAYER_NAME],msg[110]; GetPlayerName(playerid,name,20); format(msg,sizeof(msg),"[Question]: %s(%d) : %s",name,playerid,str); for(new i=0;i<MAX_PLAYERS;++i) { if(IsPlayerConnected(i) && (pAdmin[i] >= 1 || IsPlayerAdmin(i))) SendClientMessage(i,ann,msg); } SendClientMessage(playerid,COLOR_BABYGREEN, "You have asked a question, please wait for a response."); return 1; } |
if(IsPlayerConnected(i) && (pAdmin[i] >= 1 || IsPlayerAdmin(i)))
YCMD:ask(playerid,params[])
{
new str[80];
if(sscanf(params,"s[80]",str)) return SendClientMessage(playerid,0xFFFFFF,"Usage : /ask [text]");
new name[MAX_PLAYER_NAME],msg[110];
GetPlayerName(playerid,name,20);
format(msg,sizeof(msg),"[Question]: %s(%d) : %s",name,playerid,str);
for(new i=0;i<MAX_PLAYERS;++i)
{
if(IsPlayerConnected(i) && (pAdmin[i] >= 1 || IsPlayerAdmin(i)))
SendClientMessage(i,0xFFFFFF,msg);
}
SendClientMessage(playerid,0xFFFFFF, "You have asked a question, please wait for a response.");
return 1;
}
C:\Users\blank\Documents\Personal Things\GTA files\GTA SA files\SAMP\filterscripts\ycmd.pwn(66) : error 029: invalid expression, assumed zero
if(IsPlayerConnected(i) && (pAdmin[i] >= 1 || IsPlayerAdmin(i)))