View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001731 | FSSCP | FRED | public | 2008-07-22 05:30 | 2008-08-03 11:53 |
Reporter | Ransom Arceihn | Assigned To | karajorma | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Fixed in Version | 3.6.10 | ||||
Summary | 0001731: when-argument and Special Hits not behaving together | ||||
Description | This is an awfully specific bug. Using when-argument to refer to the hits-left (or shields-left) of a wing of ships will not work correctly if the ships in question have special hitpoints set. Using the regular when conditional and 'or' works fine, however, and using an identical when-argument event on a set of ships who do not have special hitpoints also works without a hitch. Test mission attached. | ||||
Tags | No tags attached. | ||||
2008-07-22 05:30
|
|
|
I know what's causing this one actually. Hits_Left calls CTEXT() to get the name of the ship. CTEXT then looks at what is there, finds the name of the ship and then moves on. But before returning it it thinks "What if this is a variable!" So it checks to see if there is a variable with that name and if so returns the value that variable holds instead. And of course when you make a Special Hits value for a ship it's added as a variable with the name of the ship. So the value of that variable is returned instead of the name. Hits-left obviously can't find the ship so the SEXP never triggers. I'm not entirely sure how to solve this problem to be honest. Having a variable named after a ship and visa versa is perfectly legal. I suppose we could add a warning about it in the future. |
|
I fixed the immediate problem but this can also occur with user-defined variables and we're going to need to do something about them too. |
Date Modified | Username | Field | Change |
---|---|---|---|
2008-07-22 05:30 | Ransom Arceihn | New Issue | |
2008-07-22 05:30 | Ransom Arceihn | File Added: specialhitstest.fs2 | |
2008-07-22 05:32 | Goober5000 | Status | new => assigned |
2008-07-22 05:32 | Goober5000 | Assigned To | => Goober5000 |
2008-08-02 20:06 | karajorma | Note Added: 0009526 | |
2008-08-02 21:27 | karajorma | Assigned To | Goober5000 => karajorma |
2008-08-03 11:53 | karajorma | Status | assigned => resolved |
2008-08-03 11:53 | karajorma | Fixed in Version | => 3.6.10 |
2008-08-03 11:53 | karajorma | Resolution | open => fixed |
2008-08-03 11:53 | karajorma | Note Added: 0009531 |