strings - 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: strings (
/showthread.php?tid=529714)
strings -
Sarra - 03.08.2014
Hello ,
I have a problem with strings, for example I'm making a command /car [engine]
so I made a new string
then
pawn Код:
if (enginestr == "engine")
{
//code
}
I get this error
Код:
array must be indexed (variable "enginestr")
Re: strings -
sammp - 03.08.2014
pawn Код:
if(!strcmp(enginestr, "engine"))
Re: strings -
Sarra - 03.08.2014
alright , this one will compare enginestr and "engine" right? so with the "!" it means ( if enginestr and "engine" are not the same)
Am I right
thanks +rep
Re: strings -
sammp - 03.08.2014
no that means if enginestr and "engine" are the same
Re: strings -
Stanford - 03.08.2014
It means that there aren't any difference between both strings.
Re: strings -
Sarra - 03.08.2014
thanks
Re: strings -
sammp - 03.08.2014
Yeah, so it means they are the same