User Tools

Site Tools


hpl2:tutorials:script:problem

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
hpl2:tutorials:script:problem [2013/10/14 22:53]
thegreatcthulhu [Unexpected end of file]
hpl2:tutorials:script:problem [2013/10/14 23:02]
thegreatcthulhu [Unexpected end of file]
Line 42: Line 42:
  
  
-{{http://​i.imgur.com/​SyBQW.png }}\\ +{{http://​i.imgur.com/​SyBQW.png?​direct&​}} 
  
 Oh look, i found it. My error tells that it's on (132, etc…) altough it's actually on (19, etc…) (not shown on the image) So now i just replace it. And Done! Oh look, i found it. My error tells that it's on (132, etc…) altough it's actually on (19, etc…) (not shown on the image) So now i just replace it. And Done!
Line 48: Line 49:
  
 However, if you use syntax highlighting capability that comes with code editors, you will probably be able to find this type of error more quickly. This is because, if syntax highlighting is enabled, string literals (the things written in double quotes, "like this") are displayed in a different color then the rest of the text; so if you forget a closing quote, there will be a piece of your code that will //look a bit wrong//. Your error will be there. Although this too might not be too easy to spot, it is easier then when you're looking at a uniformly black text. However, if you use syntax highlighting capability that comes with code editors, you will probably be able to find this type of error more quickly. This is because, if syntax highlighting is enabled, string literals (the things written in double quotes, "like this") are displayed in a different color then the rest of the text; so if you forget a closing quote, there will be a piece of your code that will //look a bit wrong//. Your error will be there. Although this too might not be too easy to spot, it is easier then when you're looking at a uniformly black text.
 +
  
 In any case, having syntax highlighting will help you avoid this type of error //as you write the script//, since you'll be immediately able to see that you've accidentally omitted a quotation mark. In any case, having syntax highlighting will help you avoid this type of error //as you write the script//, since you'll be immediately able to see that you've accidentally omitted a quotation mark.
 +
  
 Here's how syntax highlighting looks like: Here's how syntax highlighting looks like:
  
-{{:​hpl2:​tutorials:​script:​shlcode.jpg?​nolink |}} 
  
-HPL2 engine uses AngelScript for scripting, but since it's syntax is similar to the languages in the C family, you can set up your editor to use syntax highlighting for C# or C++.+{{:​hpl2:​tutorials:​script:​shlcode.jpg?​nolink& ​ }} 
 + 
 + 
 + 
 +HPL2 engine uses AngelScript for scripting, but since it's syntax is similar to the languages in the C family, you can set up your editor to use syntax highlighting for C# or C++, or, if you're using Notepad++ or Geany, configure your editor as described on the corresponding page on this wiki. 
hpl2/tutorials/script/problem.txt · Last modified: 2013/10/14 23:26 by thegreatcthulhu