• 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.

JNGP error!...

Status
Not open for further replies.
I made a spell and I used JNGP and I entered something like this...

JASS:
 private integer CASTERU          = S2I("Caster")
 private integer TARGETU          = S2I("Target")
 private integer DAMAGER          = S2I("Damage")

and this error keeps on going everytime I save the map...

so I've decided to make a new map and import all stuffs, unit, ability & trigger and no more error...

this is the error btw...


167625-albums4053-picture45667.jpg



so Im asking, why is it like this?...
 
For one, you want to use StringHash not S2I

For two, those should be constant variables

For three, did you try closing & re-opening Jass NewGen Pack and the error still repeated itself?

1. Tnx for the fast reply, Im just experimenting with S2I if it can be done :)...

2. you mean private constant?...

3. Yes, I've tried so many times, still the error appears...I even donloaded the one in your signature but that's not working...
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
S2I i think is just for converting integer strings into integers... like for when you use substrings... meaning the string you feed it should only have integers...

Nope, the string doesn't need to be "integers" :)

I'm not sure why that is happening. I've also had some weird stuff sometimes, like needing to add a comment line for things to work.

Example:

JASS:
call SetUnitX(u)
call SetUnitY(u)
//
call UnitDamageTarget(...)

And it just didn't go past the SetUnitX/Y if there was no // inbetween.
 
Status
Not open for further replies.
Top