MantisBT - Soldat Dedicated Server
View Issue Details
0000214Soldat Dedicated ServerScripting Corepublic2012-05-20 18:182015-04-16 00:28
utkesmer 
Shoozza 
lowtweakalways
resolvedfixed 
x64Windows7
2.7.3 
2.7.4 
0000214: WriteConsole doesn't write an integer unless there is a written string near it.
I'm going to explain this very shortly.

This line below, doesn't write anything to console.

WriteConsole(ID, INTToSTR(D), GOLD);

D is an integer and has a value of 0".
GOLD is a constant and defined as "$FFD700".

When I change the line as shown below, it works.

WriteConsole(ID, INTToSTR(D)+'asd', GOLD);

This one works but I, of course didn't want that "asd" so I tried the line below.

WriteConsole(ID, INTToSTR(D)+'', GOLD);

This doesn't work too. Then, I put a space there as you can see below.

WriteConsole(ID, INTToSTR(D)+' ', GOLD);

This works.

I think it's all clear.
Load the script I added here. It won't write anything. But if you do the changes I mentioned, it will. You know what to do of course, just filling the form.
No tags attached.
? asd.pas (195) 2012-05-20 18:18
https://bugs.soldat.pl/file_download.php?file_id=332&type=bug
Issue History
2012-05-20 18:18utkesmerNew Issue
2012-05-20 18:18utkesmerFile Added: asd.pas
2012-05-22 18:58ShoozzaStatusnew => confirmed
2012-05-22 19:17ShoozzaNote Added: 0001504
2012-05-22 19:17ShoozzaStatusconfirmed => feedback
2012-05-22 19:31utkesmerNote Added: 0001505
2012-05-22 19:31utkesmerStatusfeedback => new
2012-05-22 19:38ShoozzaNote Added: 0001507
2012-05-22 19:38ShoozzaStatusnew => feedback
2012-05-22 19:46utkesmerNote Added: 0001508
2012-05-22 19:46utkesmerStatusfeedback => new
2012-05-22 20:31ShoozzaPriorityimmediate => low
2012-05-22 20:31ShoozzaSeveritymajor => tweak
2012-05-22 22:59ShoozzaNote Added: 0001509
2012-05-22 22:59ShoozzaStatusnew => resolved
2012-05-22 22:59ShoozzaFixed in Version => 2.7.4
2012-05-22 22:59ShoozzaResolutionopen => fixed
2012-05-22 22:59ShoozzaAssigned To => Shoozza

Notes
(0001504)
Shoozza   
2012-05-22 19:17   
Soldat only prints text which has at least 2 chars.
Meaning text that has less then 2 chars will not get printed with WriteConsole.

I'm not sure why this restriction is there.
Maybe some of the scripters knows when and why it was added.

Do we need support for printing empty lines?
Or would 1 char limitation be ok?
(0001505)
utkesmer   
2012-05-22 19:31   
It occured after 1.6.0 or maybe 1.6.1 or 1.6.2, I don't know which one but I can say that there was absolutely no such restriction on 1.5.
(0001507)
Shoozza   
2012-05-22 19:38   
Please reply to all questions not just one.
(0001508)
utkesmer   
2012-05-22 19:46   
Well, 1 charecter limitation would be enough for me, I haven't needed to print an empty line so far. But it's clearly not my decision, that's why I left your last questions unanswered in my first message.

I wonder why such restriction was brought.
(0001509)
Shoozza   
2012-05-22 22:59   
Removed minimum line length restriction.