equal help..
#1

someone can give me define equal..?
Reply
#2

How can you not know what equal is?Equal is this symbol: "=",and in every programming language is supossed to check if a variable has a certain value,or,to check if something is true.
Reply
#3

a=1;
b=2;
c=a+b;

used for assigning a value..

if(a==b) return 1;
used to compare values.
Reply
#4

the symbol "==" is used to compare two values (not strings, they can be integers, booleans, hexadecimal values) as they have an exact match.
if you are looking for the "equal" function, I've made it for you
pawn Код:
stock equal(a,b)
    return (a==b)?1:0;
Reply
#5

amm,
equal = #define equal strcmp..

command..:
if(equal(cmd,"/tlist"))
Reply
#6

Quote:
Originally Posted by Mr_RokKi3[B]
Посмотреть сообщение
amm,
equal = #define equal strcmp..

command..:
if(equal(cmd,"/tlist"))
pawn Код:
stock equal(str1[],str2[],ignorecase=true,len=sizeof(str1))
{
    if(!strcmp(str1,str2,ignorecase,len))return 1;
    return 0;
}
next time be more accurate on what you ask.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)