String not being set
#7

Quote:
Originally Posted by DRIFT_HUNTER
Посмотреть сообщение
Remove that zero at the end of array, or put it in quote if you want to show it.

if(strfind(Temp[i][0], "null", true) != -1) -> Unless mysql returns string with value "null" (4 characters) than it wont work. If so, try replacing:
pawn Код:
if(strfind(Temp[i][0], "null", true) != -1) strcat((Temp[i][0] = EOS, Temp[i]), "Create Character", 17);
//With these
if(strlen(Temp[i]) > 0) format(Temp[i], 17, "Create Character");
First we check if mysql string was empty, and if it was then we put Create Character string in it. (I guess that is what you want)
Hm.. I believe I have fixed it now; I changed both values below and it seems to work now...
Код:
MySQL::storeString[i];
Temp[4][MAX_PLAYER_NAME] = { ... };
So I believe it was just setting the string.. but setting it with 0 letters.. which is strange as I wouldn't think it would do that, the rest of the code is fine.
Rep++ anyway!
Reply


Messages In This Thread
String not being set - by MotherDucker - 21.06.2016, 03:09
Re: String not being set - by DRIFT_HUNTER - 21.06.2016, 03:23
Re: String not being set - by MotherDucker - 21.06.2016, 03:27
Re: String not being set - by Lynn - 21.06.2016, 03:29
Re: String not being set - by MotherDucker - 21.06.2016, 03:39
Re: String not being set - by DRIFT_HUNTER - 21.06.2016, 03:55
Re: String not being set - by MotherDucker - 21.06.2016, 04:09

Forum Jump:


Users browsing this thread: 2 Guest(s)