You must be logged in to post messages.
Please login or register

AI & RM Scripting
Moderated by Sebastien, Leif Ericson

Hop to:    
Welcome! You are not logged in. Please Login or Register.No replies
Age of Kings Heaven » Forums » AI & RM Scripting » chat-using-id 'something %d something'
Bottom
Topic Subject:chat-using-id 'something %d something'
Zungen
Squire
posted 05-18-20 11:52 AM CT (US)         
So, let's say I want player A ask player B to pay tribute every so and so minutes.
(chat-to-player 1 "Give me 100 gold in the next 20 minutes.")
No biggie, right?

Say I want to use ensemble strings.
(chat-to-player-using-id 1 2307)

with string 2307 being
"Tribute %d gold to me or you will be destroyed!"

Now, how does that %d work? It surely wouldn't be
(chat-to-player-using-id 1 2307,100)
right?

How about when I have free parameters for both player and an integer, like "%s paid %d wood in tribute to you."?

%s and %d sound exactly like C printf()
You must be logged in to post messages.
Please login or register

Hop to:    

Age of Kings Heaven | HeavenGames