DisplayTextToForce to Timed

Status
Not open for further replies.
Level 7
Joined
Jul 4, 2007
Messages
249
Hi, I wanted to change this to timed text instead
  • Game - Display to Players the text: (PlayerColor[(Player number of Loan_player)] + ((Name of Loan_player) + (|r wants to borrow + ((String(Loan_playerBRequest)) + gold. Type |cFF99ccff-l|r to lend him.))))
So I converted it to custom text and just changed to DisplayTimedTextToForce and added the time udg_Loan_msgTime
JASS:
call DisplayTimedTextToForce( udg_Players, udg_Loan_msgTime, ( udg_PlayerColor[GetConvertedPlayerId(udg_Loan_player)] + ( GetPlayerName(udg_Loan_player) + ( "|r wants to borrow " + ( I2S(udg_Loan_playerBRequest) + " gold. Type |cFF99ccff-l|r to lend him." ) )
But when I run the map it says "Syntax Error, unexpected: end of line?"
 
That happens because you're not closing your brackets. Check back on how many brackets you're opening and how many you're closing.
 
No need to convert to JASS, there is already a function that does that, it's just below it :
  • Game - Display to (All players) for 30.00 seconds the text: Text
Yes but I have a lot of text messages that would be easier to change this way instead of redoing them all.
As for your custom script, I think you're missing a ")" at the end.
Tried adding that, doesn't work. I also tried removing, also doesn't work.
There is 8 ('s and 8 )'s so should be right
 
With JASS you can get rid of all of the unnecessary parenthesis fuckery that GUI adds:

call DisplayTimedTextToForce(udg_Players, udg_Loan_msgTime, udg_PlayerColor[GetConvertedPlayerId(udg_Loan_player)] + GetPlayerName(udg_Loan_player) + "|r wants to borrow " + I2S(udg_Loan_playerBRequest) + " gold. Type |cFF99ccff-l|r to lend him.")
 
With JASS you can get rid of all of the unnecessary parenthesis fuckery that GUI adds:

call DisplayTimedTextToForce(udg_Players, udg_Loan_msgTime, udg_PlayerColor[GetConvertedPlayerId(udg_Loan_player)] + GetPlayerName(udg_Loan_player) + "|r wants to borrow " + I2S(udg_Loan_playerBRequest) + " gold. Type |cFF99ccff-l|r to lend him.")
Ohh nice it works :D thanks!
 
I had a problem with this again and it seems like a custom script can be too long, so not everything will be read and therefore it can bug for that reason. So that explains why it worked when I removed a few parentheses
 
Status
Not open for further replies.
Back
Top