Equality with array
A little noob-question :)
I use Code:
to catch a players country... Now, i will compare this with a variable (i.e. "United States" ) Code:
But this is not the correct syntax (CC is a array i think)... Because the following error occured: Quote:
I've read the Help-Files, but i don't understand some things... :) thx in advance... |
Code:
|
Thx for the fast answer, but it results in the same error:
Quote:
Code:
|
Oh, wow.. It worked just a minute ago.. I'll try to figure this out. :P
Edit: Code:
|
What does this function is returning back ?
And where do i set i.e. "United States" ? :) Code:
?? |
Grr, damnit.. Remind me not to post when I'm about to hit the Zzz's. It's that damned == "United States" part that is giving you the error about the index.
|
To compare strings, you have to use the equal native:
Code:
if (equal(CC, "United States")) |
Now why didn't I think of that in the first place? :stupid:
WbO, take a look @ my updated code above. |
Thx for your efforts :)
Now it works fine :D YEEEHAAA....!!! |
Quote:
|
| All times are GMT -4. The time now is 09:51. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.