Dreae/sourcepawn-vscode

Bug with #define

JakubKosmaty opened this issue · 2 comments

All you can see at the pictures below. Bug with code highlighted.

shu_kn2j87
shu_1bw5yr
shu_ygokmn
shu_5az36m

As a temporary workaround you can append an empty string at the beginning of the define, like this

#include <sourcemod>

// Add the "" ... before the string
#define A_THING "" ... "A thing"

public void OnPluginStart()
{
	PrintToServer("Hello, World!" ... "\n" ... A_THING);
}

which prints

Hello, World!
A thing

it works for me
image

This is still a workaround so don't consider this issue closed

If you look at the second pull request I opened (#13)... it does a much better job of handling #define lines in sourcepawn.