StrEquals not working
Quick description: StrEquals dont work. SteamId is the same (compared by me). Can print out the SteamId after StrContains but not after StrEquals. Hope you can help out.
Code:
// Admin Clantag SQL |
Re: StrEquals not working
StrEqual is case sensitive by default, is it possible that SteamId and g_szSteamID are different in terms of upper and lower case letters?
|
Re: StrEquals not working
Quote:
|
Re: StrEquals not working
the if is failing because StrContains is returning 0
|
Re: StrEquals not working
StrContains is not a boolean, it returns the position in the string of the first match, so, instead you should be checking that StrContains does not return -1
|
Re: StrEquals not working
Thx for helping c: I'm now just removed the StrContains since I'm kinda retarded not to check that it returned not an boolean value... case closed.
|
Re: StrEquals not working
Quote:
It might be because the name implies it returns a boolean. That's why the function's name is strpos or something similar in other languages, which implies that it returns the position number instead of a boolean. |
Re: StrEquals not working
Yup I definitly already smashed my head on this function.
|
Re: StrEquals not working
Always read the function documentation of a native you are using. Don't assume it does exactly what the name says on the tin. I believe everybody was bitten in the ass by this function one way or another.
|
Re: StrEquals not working
Sorry to bring up this thread again up, but having another problem, memory leaks...
I tried to fix it for 2 days now, without success, idk really know what is wrong with the handles... since to me it looks normal. Code:
if (g_bAdminClantag) |
All times are GMT -4. The time now is 19:49. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.