SA-MP Forums Archive
String Problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: String Problem (/showthread.php?tid=316081)



String Problem - usersamp - 05.02.2012

How i can dothis?

if(STRING_1 != STRING_2)
{
return 1;
}


Error:
array must be indexed

EDIT:
Strcmp

Thanks.


Re: String Problem - Superthijs - 05.02.2012

Can you show me both strings?


Re: String Problem - Konstantinos - 05.02.2012

Use strcmp to compare if two strings are the same.
pawn Код:
if( !strcmp( STRING_1, STRING_2 ) )
{
    // It's the same!
}
else
{
    // It's not the same.
}