Size: a a a

2020 August 21

f

fgntfg in pro.lua
i don't get it
источник

VS

Vitaly Semenov in pro.lua
он перезаписывает файл каждый раз. А в файле не 7, потому что почему-то последний раз не сохраняется. Может close добавить?
источник

f

fgntfg in pro.lua
по идее в конце дискриптор закрывается, но да, можно
источник

ᴠɪᴋᴀʀɪ ʜᴏɴᴇsᴛ... in pro.lua
I want ask , i m need study,

cek = {["Sunday"] = 1, ["Monday"] = 2, ["Tuesday"] = 3, ["Wednesday"] = 4, ["Thursday"] = 5, ["Friday"] = 6, ["Saturday"] = 7}

for k,v in pairs(cek) do
print(v)

Output:
Saturday
Sunday
Tuesday
Wednesday
Thursday
Monday
Friday
источник

f

fgntfg in pro.lua
ᴠɪᴋᴀʀɪ ʜᴏɴᴇsᴛ
I want ask , i m need study,

cek = {["Sunday"] = 1, ["Monday"] = 2, ["Tuesday"] = 3, ["Wednesday"] = 4, ["Thursday"] = 5, ["Friday"] = 6, ["Saturday"] = 7}

for k,v in pairs(cek) do
print(v)

Output:
Saturday
Sunday
Tuesday
Wednesday
Thursday
Monday
Friday
you printing value, not key
источник

f

fgntfg in pro.lua
'''
Message Textcek = {["Sunday"] = 1, ["Monday"] = 2, ["Tuesday"] = 3, ["Wednesday"] = 4, ["Thursday"] = 5, ["Friday"] = 6, ["Saturday"] = 7} for k,v in pairs(cek) do io.open("/sdcard/1.txt","w"):write(k) end
'''
how to fix ? i try but only write one output: Sunday
источник

ᴠɪᴋᴀʀɪ ʜᴏɴᴇsᴛ... in pro.lua
fgntfg
'''
Message Textcek = {["Sunday"] = 1, ["Monday"] = 2, ["Tuesday"] = 3, ["Wednesday"] = 4, ["Thursday"] = 5, ["Friday"] = 6, ["Saturday"] = 7} for k,v in pairs(cek) do io.open("/sdcard/1.txt","w"):write(k) end
'''
how to fix ? i try but only write one output: Sunday
Yes only write sunday
источник

f

fgntfg in pro.lua
read about work with files.
источник

f

fgntfg in pro.lua
It is quite easy to fix, but it seems you dont understand basics
источник

f

fgntfg in pro.lua
I strongly recommend you to spend time with documentation
источник

ᴠɪᴋᴀʀɪ ʜᴏɴᴇsᴛ... in pro.lua
fgntfg
I strongly recommend you to spend time with documentation
😅 yes i m done
lua library is very big i've tried but can't for this code ,
источник

f

fgntfg in pro.lua
ᴠɪᴋᴀʀɪ ʜᴏɴᴇsᴛ
😅 yes i m done
lua library is very big i've tried but can't for this code ,
there is no difference in work with files between lua and php, for example
источник

ᴠɪᴋᴀʀɪ ʜᴏɴᴇsᴛ... in pro.lua
fgntfg
there is no difference in work with files between lua and php, for example
it's almost like json sent from lua to php but i just want to write print does it need a key?
источник

VD

Vlad Doc in pro.lua
Domka Hoturg
Кто может помочь? Я изучаю raycast и псевдо трехмерное изображение, картинку из лучей я построил, а как мне выделить к примеру ребро стены?
Отпиши в личку, мимо писал псевдо3д движок
источник

f

fgntfg in pro.lua
ᴠɪᴋᴀʀɪ ʜᴏɴᴇsᴛ
it's almost like json sent from lua to php but i just want to write print does it need a key?
I don't quite get your intentions.
источник

ᴠɪᴋᴀʀɪ ʜᴏɴᴇsᴛ... in pro.lua
fgntfg
I don't quite get your intentions.
print & write different results
источник

f

fgntfg in pro.lua
your code is not working as you want, because you dont understand how io.open works. Please, read the documentation.

In most programming languages functions for open files working same way.

lua io.open == php fopen, for example
источник

f

fgntfg in pro.lua
if you dont get the basics by yourself, than you can't became a programmer.
источник

S

Snusmumriken in pro.lua
ᴠɪᴋᴀʀɪ ʜᴏɴᴇsᴛ
print & write different results
1. Here different open methods: "w", "r", "a", "w+", "a+", "wb", "ab+" etc, all are different. Read about it.
2. File is the byte stream, that should be open, read/writed and C L O S E D. Read about bufferization and flush.
источник

ᴠɪᴋᴀʀɪ ʜᴏɴᴇsᴛ... in pro.lua
Snusmumriken
1. Here different open methods: "w", "r", "a", "w+", "a+", "wb", "ab+" etc, all are different. Read about it.
2. File is the byte stream, that should be open, read/writed and C L O S E D. Read about bufferization and flush.
Thanks you so much 😁 i will back after done
источник