Hey there.
So, I've got this script in the global one:
function DisplaySubtitle(CHARID, string buffer){
DisplaySpeechAt(160, 235, 320, CHARID, "%s", buffer);
}
And it gives me an error on the string... I tried some other possibilities but failed to make it work :/ So, any help would be greatly appreciated.
Why not just DisplaySpeechAt(160, 235, 320, CHARID, buffer); ? I don't think that function supports %s, BTW.
Tried that also - buffer not defined.
Hm, don't know much about this, but are you sure that the string is being transferred to the function correctly? You might want to try this as a test:
Display("%s", buffer);
The problem could be the string itself.
-Dave
CHARID is a reserved variable I think.
this one works :
function DisplaySubtitle(int charID, string buffer){
DisplaySpeechAt(160, 235, 320, charID, buffer);
}
You never specified the data type for one of the input paramaters of the function
Oh I got it Dorcan, thanks a lot!
Yes, CHARID is a bit of a confusing one. It is actually a present used internally which defines to "int charid" -- therefore you can use it in the function parmaeter list, but not as a variable in the actual code.
Basically, avoid using it at all.