Module FAQ & Documentation |
Oooooooooojz « Citoyen » 1624563960000
| 0 | ||
Plz help!how to use shaman skills in #utility or #shamousey room?!skills doesnt work :( Dernière modification le 1624564080000 |
Hufdasr « Citoyen » 1633606920000
| 0 | ||
If I save some string for a player using system.savePlayerData(playerName, data) and then I want to load it using system.loadPlayerData(playerName), where is the data loaded? Dernière modification le 1633606980000 |
Bolodefchoco « Sénateur » 1633616220000
| 0 | ||
Hufdasr a dit : It'd trigger eventPlayerDataLoaded |
Hufdasr « Citoyen » 1633622760000
| 0 | ||
on this topic is eventPlayerDataLoaded(playerName, data) Arguments:
but, on official Lua documentation is eventPlayerDataLoaded ( playerName, playerData ) Arguments:
I couldn't understand why it gives an integer when I insert a string. It is a mistake, or it is possible for the function to give an integer as well? Dernière modification le 1637479920000 |
Bolodefchoco « Sénateur » 1633655400000
| 0 | ||
I've fixed it. It should be str. Code Lua 1 2 3 4 5 6 7 system.savePlayerData("Bolodefchoco#0015", "666a") |
Hufdasr « Citoyen » 1633676160000
| 0 | ||
Thank you, you helped me a lot. :D |
Hufdasr « Citoyen » 1633712400000
| 0 | ||
On the Lua documentation, there is a note for system.savePlayerData : "Please note that this data is per player and per Lua dev, so take care not to overwrite data from another one of your modules." Do I understand correctly that it is possible to overwrite data from other modules with an input string? If so, is there any instructions on how to store and insert data correctly? I don't want to break something. |
Bolodefchoco « Sénateur » 1633729140000
| 0 | ||
It means that you only have 2,000 characters to share within all the projects hosted by the module team member. So if I'm hosting #parkour, #powers and #mycity in the same account, I have to share this storage space for all of them... Thus needing a specific format that works for all three. And yes, a mistake can end up overwriting the string. You can build your own parser or find alternatives in the forums. I like Laag's serializer: https://atelier801.com/topic?f=6&t=874652#m1 |
Wizardamani0 « Citoyen » 1634198340000
| 0 | ||
this is good thx ☺ |
Err_405 « Citoyen » 1643403420000
| 0 | ||
I can't find the definition of the function tfm.exec.bindKeyboard in this list of functions. Can u add it Shamousey? |
Bolodefchoco « Sénateur » 1643407860000
| 1 | ||
Err_405 a dit : It's system.bindKeyboard, I think that's why you can't find it. system.bindKeyboard(playerName, keyCode, down, bind) Effect: Binds a key to be listened for. Whenever a player presses a bound key, it will trigger eventKeyboard(). Note: Some keys (such as "A and Q") can act differently between both QWERTY and AZERTY keyboards. Arguments:
Example: Code Lua 1 system.bindKeyboard("Melibellule#0001", 32, true, true) |
Err_405 « Citoyen » 1643565360000
| 0 | ||
Bolodefchoco a dit : Thx |
0 | ||
Is it possible to change the color of the mouse or force it to use a skin from inventory? |
King_seniru « Censeur » 1643619240000
| 2 | ||
Bye a dit : Nope, sadly :( You can add an image overlay with addImage but that wouldn't look really well |
King_seniru « Censeur » 1643785680000
| 1 | ||
New lua update! (01/28/2022) - Not really new but just in case noobs don't know
New events a dit : Dernière modification le 1643785740000 |
Wizardamani0 « Citoyen » 1643801400000
| 0 | ||
ok -_- |
Err_405 « Citoyen » 1644062520000
| 0 | ||
Guys, I tried to run this script in the tribe house: t = {10, print, x = 12, k = "hi"} for k, v in pairs(t) do print(k, v) end This is what showed in the #lua channel: • # 1 • # 2 • # x • # k How do I fix this? Thanks! |
Err_405 « Citoyen » 1644065100000
| 0 | ||
Also, I ran this code in zerobrane studio: t = {} for line in io.lines() do table.insert(t, line) end print(#t) And when I input the lines I don't know how to reach the end of the program because it keeps asking me to input lines. What do I do? Thanks so much! |
King_seniru « Censeur » 1644068820000
| 1 | ||
Err_405 a dit : How to fix what exactly, what's the expected behavior? If the problem is the value (v) related with table's keys (k) not getting printed, it's because the lua implementation in tfm doesn't accept "vararg" type arguments for print. To print both k and v do print({k, v}) Err_405 a dit : When you press enter in the newline without typing any other value, it'd send an empty string (""). So do it like this code Code Lua 1 2 3 4 5 6 t = {} You can also do Ctrl+C to terminate the program, and it would give the same output as above Dernière modification le 1644069060000 |
Err_405 « Citoyen » 1644069180000
| 0 | ||
King_seniru a dit : OMFG that's exactly what I wanted to try at the last program. Thanks a lot! Do you use discord? I may need more help with this stuff. I just started learning lua... |