Post new topic    
Red Slime
Send private message
Incredibly basic string question 
 PostSat Oct 20, 2018 4:25 pm
Send private message Reply with quote
So I'm a string noob, and whenever I try to define a string in my scripts, I always get an error. It seems like I should be doing everything right. Eg,
Code:
plotscript, script name, begin
  $1 =“String goes here”
end

comes up with
Code:
$ may only be used as part of a $...="..." or $...+"..." construct

I feel that I'm missing something really obvious here, but I've tried formatting it in many different ways. Any help would be appreciated
Liquid Metal Slime
Send private message
 
 PostSat Oct 20, 2018 5:09 pm
Send private message Reply with quote
That space between the 1 and the = is suspicious. That's the only thing I can imagine being wrong with it.
I can't write in cursive.
Red Slime
Send private message
 
 PostSat Oct 20, 2018 6:55 pm
Send private message Reply with quote
Stuff like

Code:
  $1=“String goes here”,   $1 = “String goes here”


And other combinations of spaces don't seem to work either.
Liquid Metal Slime
Send private message
 
 PostSat Oct 20, 2018 7:05 pm
Send private message Reply with quote
Strange... I have the same syntax in the load game script for ROK, and it works just fine. Can you post the context for the rest of your script? There may be something interfering.
I can't write in cursive.
Liquid Metal Slime
Send private message
 
 PostSat Oct 20, 2018 7:34 pm
Send private message Reply with quote
It's the smart quotes you're using. Retype the quotes in Notepad then try again. They should be the normal "straight" version of quotes (like what comes up when you type a message here on Slime Salad). Plotscript doesn't recognize unusually formatted marks like smart quotes, smart ellipses, M-dashes, etc. It wants everything in its purest, nonformatted form.
Place Obligatory Signature Here
Red Slime
Send private message
 
 PostSat Oct 20, 2018 7:50 pm
Send private message Reply with quote
Pepsi Ranger wrote:
It's the smart quotes you're using. Retype the quotes in Notepad then try again. They should be the normal "straight" version of quotes (like what comes up when you type a message here on Slime Salad). Plotscript doesn't recognize unusually formatted marks like smart quotes, smart ellipses, M-dashes, etc. It wants everything in its purest, nonformatted form.


Yep, this was it. Thanks for the help
Display posts from previous: