• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

How to use string.format

president vankk

Web Developer & AuraOT Owner
Joined
Jul 10, 2009
Messages
5,719
Solutions
9
Reaction score
339
Hi guys, could someone explain me how to use string.format? I did some quick search on google but I did not understand.

Thanks.
 
Hi guys, could someone explain me how to use string.format? I did some quick search on google but I did not understand.

Thanks.

string.format("got %d cats with my girlfriend %s", number, string)

%s -Take the next argument and print it as a string
%d -Take the next argument and print it as an int

also quotin my negro colandus

string.format("%.2f", 0.23233)

where 2 is the amount of decimals. returns 0.23, but note that 0.3 will become 0.30 :p
 
Back
Top