Strcmp - stopped working. - 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: Strcmp - stopped working. (
/showthread.php?tid=516553)
Strcmp - stopped working. -
Aerotactics - 31.05.2014
Brief: in this example, I am attempting to check if a player's name matches the string of the house renter. If they are not the same, the script still continues for whatever reason:
pawn Код:
if(!strcmp(hInfo[id][hrenter],GetName(playerid), false))
Re: Strcmp - stopped working. -
rumen98 - 31.05.2014
Hmm, try to remove ,, ! '' before strcmp
because at the moment I think I think the checks and put every player who is not a house renter
Re: Strcmp - stopped working. -
Aerotactics - 31.05.2014
Quote:
Originally Posted by rumen98
Hmm, try to remove ,, ! '' before strcmp
because at the moment I think I think the checks and put every player who is not a house renter
|
I'll try it.
EDIT: nope, now It thinks I own all businesses.
Re: Strcmp - stopped working. -
rumen98 - 31.05.2014
hmm I dont know ....
AW: Strcmp - stopped working. -
Nero_3D - 31.05.2014
The other possibility could be that either the first or the second argument is empty which cases also a 0 as return
But to be sure that it is strcmp you should print both arguments before strcmp and add a control check after strcmp
Re: AW: Strcmp - stopped working. -
Aerotactics - 31.05.2014
Quote:
Originally Posted by Nero_3D
The other possibility could be that either the first or the second argument is empty which cases also a 0 as return
But to be sure that it is strcmp you should print both arguments before strcmp and add a control check after strcmp
|
The issue might be in my loop. Thanks for the help.