Jump to content

[Solved] Proper Lua syntax highlighting


AggrorJorn
 Share

Recommended Posts

I've noticed that a lot of commands that I am using in Lua script can be mixed with the ones from C++. Some times a command works and sometimes it doesn't. The weird thing is that the C++ commands often turn blue while the actual Lua command stays black .

 

Place the following in your lua script editor and you'll see:

--both commands work in the Lua script editor
-- Lua command
body:SetCollisionType(1,1)
--C++
EntityType (body,1)


--Lua command in combination with C++. Doesn't work
ground:PaintEntity(material)
--command that you should use, but does not turn blue
ground:Paint(material)

Link to comment
Share on other sites

  • 4 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...