• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[JASS] Weird JASS function error

Status
Not open for further replies.
Hello, I'm currently creating a function that should store variables into a DPS system... But I've encountered a weird error, I don't know why it's appearing...

This is the function:

JASS:
function SetDPS takes unit uc, unit ud, real dmg, real dur, string effectpos, string speffect returns nothing

endfunction

and this is how I call it:

  • Cast
    • Events
    • Conditions
    • Actions
      • Custom script: call SetDPS(udg_DT_Caster[udg_DT_Index[3]], udg_u[0], udg_DT_DPS[udg_DT_Index[3]], 2.0, "overhead", "Abilities\Weapons\PoisonSting\PoisonStingTarget.mdl")
(Don't care about the "udg_DT" variables and such, it's just a test)

but this will give me this error:
  • Expected expression
  • Expected a function name

but when I remove "Abilities\Weapons\PoisonSting\PoisonStingTarget.mdl" it won't give me any error... Seriosly, whats wrong?
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
While you're on the topic of strings and slashes, you can do:

JASS:
local string s = "\""

This will be a string that is filled with nothing but ". The back-slash characters yield a special character right after them, so if you've just got one "\" then it won't necessarily mean it is a back-slash, but if you've got two then the processor/compiler can ensure it is always a back-slash.
 
Status
Not open for further replies.
Top