how to fix that ?????
#1

i have a code and it have a lil problem with pawno , the code is this
Код:
if (strcmp("/gw", cmdtext, true, 10) == 0)
		{
		if(IsPlayerAdmin(playerid))
		SendClientMessage(playerid, COLOR_YELLOW, "================GW Admins Help=============");
		SendClientMessage(playerid, COLOR_YELLOW, "================/hi, /gw=============");
		SendClientMessage(playerid, COLOR_YELLOW, "================GW Admins Help=============");
		else
  		{
		SendClientMessage(playerid, 0xff0000ff, "You are not an admin !!!");
		}
		return 1;
		}
so thats the code and the error is :
Quote:

error 029: invalid expression, assumed zero

what should i do , and how to fix that , i didn't meet any error in my life like this fuckin error ,
btw sorry for the word F@#K
Reply
#2

If you indent your code, you will notice you missed some brackets:

Indented:
pawn Код:
if (strcmp("/gw", cmdtext, true, 10) == 0) // you don't need to specify how many characters you're going to use (10)
{
    if(IsPlayerAdmin(playerid))
    // there should be a bracket here
        SendClientMessage(playerid, COLOR_YELLOW, "================GW Admins Help=============");
        SendClientMessage(playerid, COLOR_YELLOW, "================/hi, /gw=============");
        SendClientMessage(playerid, COLOR_YELLOW, "================GW Admins Help=============");
    // same here
    else
    {
        SendClientMessage(playerid, 0xff0000ff, "You are not an admin !!!");
    }
    return 1;
}
Fix:
pawn Код:
if (strcmp("/gw", cmdtext, true) == 0)
{
    if(IsPlayerAdmin(playerid))
    {
        SendClientMessage(playerid, COLOR_YELLOW, "================GW Admins Help=============");
        SendClientMessage(playerid, COLOR_YELLOW, "================/hi, /gw=============");
        SendClientMessage(playerid, COLOR_YELLOW, "================GW Admins Help=============");
    }
    else
    {
        SendClientMessage(playerid, 0xff0000ff, "You are not an admin !!!");
    }
    return 1;
}
Reply
#3

i'll try and btw U R The BEST Miguel , thanks very much
sooooooooooooo much thx
Reply
#4

but how u create the pawn Code: with colors
Reply
#5

Use [ pawn] code here [ /pawn] tags instead of [ code] [ /code].
Reply
#6

Quote:
Originally Posted by MBX97
Посмотреть сообщение
but how u create the pawn Code: with colors
can you also stop constantly double posting....
Reply
#7

again thanks
Reply
#8

pawn Код:
new string[128];
sorry just testing it
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)