Sorry I can't say anything about Remstart and Remend because I've never used them but I think I might just to see if I run into any problems.
Quote: "Another situation I couldn't have a REMARK using the left quote (left of one key)"
The 'Tilde'
Okay, answered your first problem in the other thread. Use something like:
type mytype : ` used for doing this and that
x as integer
y as integer
endtype
Ok, now this should help with structuring your code. I can see where you've gone messy just by that small explanation. It's good that you keep globals at the top, they're easy to access, add new ones, check what type etc. The problem lies in that you have your functions in the Main source code at the top. Of course the compiler cannot run into a function because it'll just go beserk, this is with all languages. Here's how I setup my code:
`Pre-game commands
Sync On
Sync Rate 0
etc
`What each var does
Global VarName
`Default Values for vars
VarName = 20
`Main Loop
Do
DoStuff()
Sync
Loop
`Functions
Function DoStuff()
`Move Guy or whatever
End Function
Then in any other source file I'll have more functions. I don't have any procedural commands in an external source file because the program should never naturally run into them. I only keep functions in external sources, not even global variables. I also make a habit to use Hungarian notation, ie. Name my variables: strCharName or intYCharPos - Makes it easier to remember what type it is so you don't run into as many 'stupid' errors like assigning an integer to a string which I used to do a lot.
"Computers are useless they can only give you answers."