Little error. Having this many times
#1

Hey guys. When I use this:
Код:
	}

	if (strcmp("/policetolsv", cmdtext, true, 10) == 0)
	{
	if(PlayerInfo[playerid][Warperm] > 1)
	GangZoneDestroy(LspZone);
  LspZone = GangZoneCreate(1326.343, -1887.144, 1702.824, -1575.273);
  	GangZoneShowForAll( LspZone, 0xFFFF00AA);
  	else
  	SendClientMessage(playerid,red,"You don't have any gang perms");

	

	return 1;
	}
It tells me this
Код:
C:\Users\Bart\Desktop\samp server\filterscripts\ladmin4v2.pwn(5759) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#2

You should really learn some basic things first, your code is very messy and i don't even know what do you want to do with it..
Reply
#3

Well, this is the wrong thing

else
SendClientMessage(playerid,red,"You don't have any gang perms");

It gives the errors when I put else in
Reply
#4

Quote:
Originally Posted by bartje01
Hey guys. When I use this:
Код:
	}

	if (strcmp("/policetolsv", cmdtext, true, 10) == 0)
	{
	if(PlayerInfo[playerid][Warperm] > 1)
	GangZoneDestroy(LspZone);
  LspZone = GangZoneCreate(1326.343, -1887.144, 1702.824, -1575.273);
 	GangZoneShowForAll( LspZone, 0xFFFF00AA);
 	else
 	SendClientMessage(playerid,red,"You don't have any gang perms");

	

	return 1;
	}
It tells me this
Код:
C:\Users\Bart\Desktop\samp server\filterscripts\ladmin4v2.pwn(5759) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
uhm...good to know which line is the error line well...firstly change it to:

if (strcmp("/policetolsv", cmdtext, true, 10) == 0)
{
if(PlayerInfo[playerid][Warperm] >= 1){
GangZoneDestroy(LspZone);
LspZone = GangZoneCreate(1326.343, -1887.144, 1702.824, -1575.273);
GangZoneShowForAll(LspZone, 0xFFFF00AA);
}else{
SendClientMessage(playerid,red,"You don't have any gang perms");
}
return 1;
}
Reply
#5

pawn Код:
if (strcmp("/policetolsv", cmdtext, true, 10) == 0)
    {
    if(PlayerInfo[playerid][Warperm] > 1)
    {
      GangZoneDestroy(LspZone);
      LspZone = GangZoneCreate(1326.343, -1887.144, 1702.824, -1575.273);
      GangZoneShowForAll(LspZone, 0xFFFF00AA);
    }
    else SendClientMessage(playerid,red,"You don't have any gang perms");
    return 1;
    }
L2bracket.

EDIT: Ninja'd. Either post will probably work.
Reply
#6

Thx guys
Reply
#7

Seriously, learn to use brackets.
Reply
#8

Quote:
Originally Posted by biltong
Seriously, learn to use brackets.
Not only that, he should also learn some basics like i already mentioned before.

Quote:
Originally Posted by bartje01
pawn Код:
if (strcmp("/policetolsv", cmdtext, true, 10) == 0)
{
  // other code
}
/policetolsv has 12 characters, not 10.

So this would be correct:
pawn Код:
if(strcmp("/policetolsv", cmdtext, true, 12) == 0)
{
  // other code
}
or:
pawn Код:
if(strcmp("/policetolsv", cmdtext, true) == 0)
{
  // other code
}
Reply
#9

Quote:
Originally Posted by Don Correlli
Quote:
Originally Posted by biltong
Seriously, learn to use brackets.
Not only that, he should also learn some basics like i already mentioned before.

Quote:
Originally Posted by bartje01
pawn Код:
if (strcmp("/policetolsv", cmdtext, true, 10) == 0)
{
  // other code
}
/policetolsv has 12 characters, not 10.

So this would be correct:
pawn Код:
if(strcmp("/policetolsv", cmdtext, true, 12) == 0)
{
  // other code
}
or:
pawn Код:
if(strcmp("/policetolsv", cmdtext, true) == 0)
{
  // other code
}
Thank you for showing me what that number means, lol I didn't know that. ZCMD has made me lazy -.-
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)