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

How can I fix this Custom Script line?

Status
Not open for further replies.
Level 12
Joined
Mar 10, 2008
Messages
869
Hello.
I'm currently working on and RPG and I have a Custom EXP system. In this trigger - the player casts a skill to see how much experience he/she has and how much is until the next level.
It should look a little bit like this:
Say, if the player is level 5 in the custom exp system, and has 300 exp and the next level is 400 exp then...
EXP: 300 / 400

This is what my JASS line looks like:
JASS:
    call DisplayTextToPlayer((GetOwningPlayer(GetSpellAbilityUnit()),0,0,"|c0000FF00EXP: "+I2S(udg_WoodChoppingXP[GetPlayerId(GetOwningPlayer(GetSpellAbilityUnit())+1])+" / "+I2S(udg_EXPLevelUp[GetUnitAbilityLevelSwapped('A001',(GetOwningPlayer(GetSpellAbilityUnit()))+1]))

Basically, it's like this: DisplayTextToPlayer ( Owning Player ( Casting unit ) ) "|c0000FF00EXP: " + Integer 2 String ( Wood Chopping Experience ( Player Id ( Owning Player ( Casting Unit ) ) + 1 (because it's not GetConvertedPlayerId) ) + " / " + Integer 2 String ( EXPLevelUp* [ Casting Unit Ability Level ( Owning Unit ( Casting Unit ) ) + 1 ] (because that's the next level exp) )

* This is a list of numbers saying which number is the next level up.

It says Missing )
and
syntax error
and
Bad types for binary operator

Anyone know how to fix it?
 
use this:
JASS:
    call DisplayTextToPlayer(GetOwningPlayer(GetSpellAbilityUnit()),0,0,"|c0000FF00EXP: "+I2S(udg_WoodChoppingXP[GetPlayerId(GetOwningPlayer(GetSpellAbilityUnit())+1]))+" / "+I2S(udg_EXPLevelUp[GetUnitAbilityLevelSwapped('A001',(GetOwningPlayer(GetSpellAbilityUnit()))+1])))

You were simply missing some ).
 
Status
Not open for further replies.
Top