In my playerScript i tried to make a literal to hold a package of data for casting a spell. it loosk like this:
var playerSpell = {
SpCost : 0.0,
SpCost2 : 0.0,
SpDelivery : "",
SpSubDelivery : "",
SpEffect : "",
SpMod1: "",
SpMod2: "",
SpMod3: "",
SpMod4: "",
SpMod5: "",
SpDamage :0.0,
SpDuration :0.0,
SpForce :0.0,
SpProjectile :0.0,
SpProjectilesSize :0.0,
SpFireRate :0.0,
SpChargeMax :0.0
};
but every one of the variables triggers an “unexpected identifier” error.
I’m not sure if this is just a syntax error, or if unity doesnt allow this kind of thing or what. If anyone knows id appreciate some help.
ahh i see, thanks for the clarification. since posting this i found a nice website that shows a unityscript example of what i was trying to achieve.
– hardmode2236