FreeSpace Releases > Scripting Releases

ship save/load script

<< < (2/18) > >>

Nuke:
this is not familiar territory for me. the only mission integration i have done is using the script-eval sexp (this is used by the atmospheric flight script to tell it what planetary/atmospheric profile to use for the mission).

does the sexp expect some kind of termination on the string, like a \0 or \r\n or some such?

*edited because im a moron*

Admiral MS:

--- Code: ---(mn:runSEXP("is-destroyed-delay !0! !"..shipname.."!"))
--- End code ---

This returns a true (for running that sexp succesfully) so unless evaluateSEXP ist totally different it should be right. And as i already said, it doesn't matter if i use evaluateSEXP("") or evaluateSEXP("stuff"), the error message is the same.

It feels more like something is buggy. I never got an assertion in debug up to now, not even a crash at all no matter what i did in my script. And one time the game freezed without error message when getting to the evaluateSEXP part...

General Battuta:
The error message makes it look like the initial 'i'  in 'is' is somehow being chopped off and the SEXP thus cannot be recognized. That's weird.

Nuke:
i dont see any reason in the source why that should happen, did you try padding it with whitespace?

though there is this amusing little snippet:

--- Code: ---
// HACK: ! -> "
for (i = 0; i < (int)strlen(buf); i++)
if (buf[i] == '!')
buf[i]='\"';


--- End code ---

Admiral MS:
Adding spaces in front of it changes nothing, adding an "i" in front of it freezes the normal game but debug keeps producing the same assertion. So i guess the normal game just crashes because it ignores that assertion or whatever and tryes to go on somehow.


--- Quote ---
--- Code: ---
// HACK: ! -> "
for (i = 0; i < (int)strlen(buf); i++)
if (buf[i] == '!')
buf[i]='\"';


--- End code ---

--- End quote ---

Uh what's that?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version