SA-MP Forums Archive
A little 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: A little problem... (/showthread.php?tid=330793)



A little problem... - Libra_PL - 02.04.2012

Hello,

I've got a little problem with my code and I don't know why an error appears. Could anyone help me?

In top of script:
Код:
#define AdminPassword "password"
Later, under OnDialogResponse:
Код:
if(strval(inputtext) == AdminPassword) //Line 1037
And I have...

Код:
...(1037) : error 033: array must be indexed (variable "-unknown-")
... error under that 1037 line. I can't fix this (because I don't know what's wrong), so I hope someone will help me in that.


Re: A little problem... - blank. - 02.04.2012

strval is used to convert a string to an integer.
Use strcmp.


Re: A little problem... - Cjgogo - 02.04.2012

Why don't you try it as new AdminPass[24];?