Little help please? :)
#1

pawn Код:
C:\Documents and Settings\Janek\Desktop\URP TESTIMINE!\gamemodes\Testimine.pwn(304) : warning 206: redundant test: constant expression is non-zero
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.
Please Help!!!
Reply
#2

Show me that line and it's neighbours.
Reply
#3

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>[Unyti-Peavдrav]<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<//
    if (strcmp("/upava", cmdtext, true, 10) == 1810.9568, -1889.4921, 13.4075 )
    {
       MoveObject(unytipeav2rav1, 1811.25964355, -1895.96801758, 5.0000000, 2.00 );
       SetTimer("sule", 7000, 0); // Vдrav sulgub 7 sekundi pдrast
       SendClientMessage(playerid,COLOR_GREEN,"Sa avasid Unyti Peavдrava, ning se sulgub 7 sekundi pдrast!");
       return 1;
       }
    return 0;
}
Reply
#4

please define error line! we don't know the line what have errors!
Reply
#5

pawn Код:
if (strcmp("/upava", cmdtext, true, 10) == 1810.9568, -1889.4921, 13.4075 )
Reply
#6

wtf ure tryting ot do lol? that won't work! try this:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>[Unyti-Peavдrav]<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<//
    if (strcmp("/upava", cmdtext, true, 10) == 0 )
    {
if(IsPlayerInRangeOfPoint(playerid, 7.0, 1810.9568, -1889.4921, 13.4075))
    {

       MoveObject(unytipeav2rav1, 1811.25964355, -1895.96801758, 5.0000000, 2.00 );
       SetTimer("sule", 7000, 0); // Vдrav sulgub 7 sekundi pдrast
       SendClientMessage(playerid,COLOR_GREEN,"Sa avasid Unyti Peavдrava, ning se sulgub 7 sekundi pдrast!");
}
       return 1;
       }
    return 0;
}
Reply
#7

That does nothing.
Should be:
pawn Код:
if( strcmp( "/upava", cmdtext, true, 10 ) == 0 )
EDIT: Slow.
Reply
#8

Work now, tnks dud!
Reply
#9

xD he he
Reply
#10

Quote:
Originally Posted by Janek17
Посмотреть сообщение
Work now, tnks dud!
pawn Код:
if (strcmp("/command", cmdtext, true, 7) == 0 ) // Seven is the command length
That's usually how the commands using strcmp look like.
I suggest you throw that in the recycle bin, and start using ZCMD and SSCANF2.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)