String is not being stored correctly in enum - 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: String is not being stored correctly in enum (
/showthread.php?tid=640917)
String is not being stored correctly in enum -
AndreiWow - 09.09.2017
I don't understand what's wrong with this.
I added this:
PHP код:
nInfo[1][ID] = 1;
new cName[50], time[15], date[15], message[250];
format(cName, 50, "John");
format(time, 15, "20:53");
format(date, 15, "08/09/2017");
format(message, 250, "Someone please come really quick, my wife is giving birth, oh damn this one is gonna be a gangsta");
nInfo[1][CallerName] = cName;
nInfo[1][CallerPhone] = 523221;
nInfo[1][Time] = time;
nInfo[1][Date] = date;
nInfo[1][Message] = message;
under OnPlayerConnect just to have something to test with
but when I try to read that in game, it is displayed as this:
https://imgur.com/a/7IZSx
So looks like the date is bugged but why, the thing that is displayed has no logic
Re: String is not being stored correctly in enum -
Dayrion - 09.09.2017
Use format for strings not '='.
Re: String is not being stored correctly in enum -
AndreiWow - 09.09.2017
Quote:
Originally Posted by Dayrion
Use format for strings not '='.
|
Oh wow, I just spotted the issue, damn, lol I was so blind, thanks tho
Re: String is not being stored correctly in enum -
Dayrion - 09.09.2017
Quote:
Originally Posted by AndreiWow
Oh wow, I just spotted the issue, damn, lol I was so blind, thanks tho
|
You are welcome, have a good night.