24.11.2010, 15:05
Quote:
As far as I understood, you want to store all data you read from line 'x'?
Possible. Even very simple. |
Like so:
pawn Код:
//Start of the file, Line 1.
main () //Line 2
{ // Line 3
// Line 4
} // Line 5
// Line 6
PrintCurrentLine() // Line 7
{ // Line 8
return printf("Current Line: %i", GetScriptLine()); //Line 9, prints to console: "Current Line: 9"
} // Line 10
You 100% sure? It is possible, that it's impossible (lol), but it's also possible that there might just be a way, just noone really uses it, so a few know about it.
If there is such a thing it is probably not a function, but some kind of instruction for compiler.
There is a Directive "#line" available. But this is what the wiki says about it:
Код:
#line This is another mostly useless directive like #file. It just specifies the current line number if you feel the need to change it.