• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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?
 
Status
Not open for further replies.
Top