Author Topic: Error/mistake in patch 1.1.1 (tubeLaunch-sct.tbm)  (Read 471 times)

0 Members and 1 Guest are viewing this topic.

Error/mistake in patch 1.1.1 (tubeLaunch-sct.tbm)
Hello,

i encounter an error/mistake in the tubeLaunch-sct.tbm that was released in patch 1.1.1

This is the Link to the topic: http://www.hard-light.net/forums/index.php?topic=90632

This is the quote of the important post:
On the retail version i can't reproduce the error with the two scripts.

But i have found some other interesting part.

As i get back the original version of the script i see that the block is multi line commented.

Code: [Select]
;--[[
;; General Documentation:
;; This script supports the launch from a moving and even turning battlestar. There are some issues when the battlestar is accelerating where a small displacements is observable but once the ship has reached a given speed this disappears.

#Global Hooks

$Simulation:
[
if (tubeLaunches ~= nil) then
    tubeLaunches:onFrame()
end
]
;]]

#End

So there are two funny things
1. There should be a problem because the "Global Hooks" Section is commented but the "#End" Section isn't. So there is a end section without a start section. (On my test i accidentally repaired this).

2. If i implement a mistake in the commented code (for example changed "~=" to "~x=" the game generates me a scripting error. Is there maybe a problem with the comments, too ?
The "problem" here is that those Lua comment blocks are themselves... commented out (notice the semicolons). They don't actually make sense outside of a hook anyway. If you wanted to comment out the entire hook, you'd need to use FSO's multi-line comment syntax, which is either "/*" and "*/", or "!*" and "*!" (either style works, but you can't intermix the two).

I think the "$Simulated" Section should be commented (starting with --[[ ended with ]]) if this is right then the section can also be deleted . Also the comment should be fixed.

With kind regards

Askahain