14.10.2012, 08:46
Hi everyone,
The title may sound a little strange, so let me explain what the problem is here.
If someone wants to buy a house, they get a dialog where they have to type the exact house adress they want to buy.
I use strcmp to do this, here is my code:
So, when I test this, the following happens:
I type the adress in the dialog, but incomplete.
Let's say I want to buy house adress "51.Main Street", if I type, 5.Mainstreet(5.Mainstreet does not exist), it buys one of the houses with "main street" in the adress.
Now, the big question, how can I make the script check the exact string, so that it will only buy if it is the exact adress?
Thanks in advance
The title may sound a little strange, so let me explain what the problem is here.
If someone wants to buy a house, they get a dialog where they have to type the exact house adress they want to buy.
I use strcmp to do this, here is my code:
pawn Code:
if(strcmp(inputtext,HInfo[i][Streetname],false) != -1)
I type the adress in the dialog, but incomplete.
Let's say I want to buy house adress "51.Main Street", if I type, 5.Mainstreet(5.Mainstreet does not exist), it buys one of the houses with "main street" in the adress.
Now, the big question, how can I make the script check the exact string, so that it will only buy if it is the exact adress?
Thanks in advance


replace housenumber and streetname and use cstrcmp with address and inputtext
