accentuation in lua language - lua

When I put accents it doesn't print the way I expected
print("What's your name?")
local name = io.read()
print("your name is " ..name.. "!!")
in VS Code when i try to run it prints "your name is eval bárbara!!"
when I try to run it in Geany it prints: "your name is b rbara!!"

Related

how to fix Players.louie43pro.PlayerGui.admin.Frame.LocalScript:10: Expected identifier when parsing expression, got ')' error roblox studio?

I have a problem in Roblox studio. There's an error when im trying to make an admin command script using local script.
The error is
Players.louie43pro.PlayerGui.admin.Frame.LocalScript:10: Expected
identifier when parsing expression, got ')'
I have tried so many things to fix this error.
please help.
This is the script that i have
local rs = game:GetService("ReplicatedStorage")
local commandEvent = rs:WaitForChild("CommandEvent")
local frame = script.Parent
local enter = frame.Enter
local box = frame.CommandBox
--takes command and splits it up
local function get_command()
local command = ()
for word in string.gmatch(box.Text, "\S+") do
table.insert(command, word)
end
local action = command[1]
local person = command[2]
print(action)
print(person)
commandEvent:FireServer(action, person)
box.Text = " "
end
enter.MouseButton1Click:Connect(get_command)
Can anybody help me with my problem?
please..
local command = () is not valid Lua syntax.
() is the call operator. You want to create a table value so use the table constructor {}
local command = {}
Or maybe you forgot a function name? You could also do something like this
local command = getMeSomeTable()
Then the call operator would make sense. That function should return a table of course.
As soon as you have fixed this error you'll face another error for using an invalid escape sequence. Replace \S with %S to match a non-whitespace character.
In case you do not find 2 matches you'll run into the next error. So you should check if command actually has two elements at keys 1 and 2 befor you index them.
So maybe add something like
if action and person then command:FireServer(action, person) end

attempt to concatenate nil with string Roblox

I'm very confused. I'm trying to make it so that if you hold E with Roblox's "ProximityPrompt", you will get a GUI on your screen with some text. Everything works except that the text won't work. I also am not writing a string on the client script. There is a variable for it on the server script that gets passed over. But I keep seeing this error in the output.
Players.ford200000.PlayerGui.BuyGui.Frame.TextInput.Text:2: attempt to concatenate nil with string - Client -
Here is what I'm doing in my script
local sp = script.Parent
sp.ProximityPrompt.Triggered:Connect(function(player)
local name = sp.Name
local ss = game.ServerStorage
local item = ss.Hats:FindFirstChild(name)
local price = item.Price
game.ReplicatedStorage.ShopClickEvent:FireClient(player)
game.ReplicatedStorage.ShopInfoEvent:FireClient(player)
end)
And in the local script that listens for ShopInfoEvent
game.ReplicatedStorage.ShopInfoEvent.OnClientEvent:Connect(function(player, price, item)
script.Parent.Text = "Would you like to buy this ".. item.Name .." for ".. price.Value .."?"
end)
Please help, that would be greatly appreciated.
Your error is telling you that the object you are trying to add to a string is undefined.
This could be item.Name or price.Value is undefined and causing this string construction to fail.
Looking at how you are defining item and price shows that both of these values are undefined in your LocalScript's callback. When you call a RemoteEvent's FireClient function, the first argument tells the engine who to send the event to, and all the other arguments get passed in as the arguments of the callback. Currently, you aren't passing in any arguments at all.
So to fix your problem, you need to pass in the right arguments from the Script:
game.ReplicatedStorage.ShopInfoEvent:FireClient(player, price, item)
and parse them properly in your LocalScript :
game.ReplicatedStorage.ShopInfoEvent.OnClientEvent:Connect(function(price, item)
script.Parent.Text = "Would you like to buy this ".. item.Name .." for ".. tostring(price.Value) .."?"
end)
Players.ford200000.PlayerGui.BuyGui.Frame.TextInput.Text:2: attempt to
concatenate nil with string - Client -
tells you everything you need to know.
You're trying to concatenate nil with string. That means you're using the string concatenation operator .. with a nil operand in line 2
So let's look into line 2
script.Parent.Text = "Would you like to buy this ".. item.Name .." for ".. tostring(price.Value) .."?"
"Would you like to buy this ", " for " and "?" are obviously strings. That leaves us with item.Name and tostring(price.Value).
If price.Value were nil, tostring would turn it into "nil". So this cannot be the cause of this particular error message.
That leaves us with item.Name. If item were nil we would see an error for indexing a nil value instead. So that tells us that whatever item is, it is not what we expected to be. A table with an element for key "Name".
At this moment you know that something is wrong with the parameters of your function. So you (hopefully again) refer to the manual and compare that with the way you use those event functions.

Advice with a "Story Roblox Creator Challenge" project I'm working on

So I was bored and decided to work on a Roblox game. I'm currently using the "Story Roblox Creator Challenge" template but I don't know how to make it do what I want it to do...
Here is the code so far. For some reason, it doesn't show both questions and says "PlayerName" instead of my username
,,
local name01 = storyMaker:GetInput("What Is Your Name?")
local gender01 = storyMaker;GetInput ("Are You A Boy Or A Girl?")
local story = "My name is " .. name01 .. ", /n "I Was Just Your Average" .. gender01 ". "
In the variable gender01, there is a semicolon between storyMaker and GetInput.
Also "I Was Just Your Average" is not inside a string,
and you are putting a variable inside a string, which will return "gender01" instead of the variable's value, and there is a period not inside a string.
The Code Should Be:
local name01 = storyMaker:GetInput("What Is Your Name?")
local gender01 = storyMaker:GetInput("Are You A Boy Or A Girl?")
local story = "My name is " .. name01 .. ", /n I Was Just Your Average".. gender01.."."
I am not a expert at roblox lua but it might help anyways.

Lua not instantiating local variable fast enogh to print it? Embeded ESP8266

I got an EPS8226 on which I uploaded a main.lua file and some other configs. When I run main.lua with dofile() in the terminal, the print from the callback function prints only "sensorId" without "sent 0". Yet, if I run main.lua again, or I print() something before (either inside the function() that calls the callback, or inside the callback itself) it will print properly "sensorId sent 0". This also works if I do not use the local variable.
function registerReaders()
for key, value in pairs(sensorConfig.data)
do
gpio.mode(value.pin, gpio.INPUT)
value.timer:alarm(value.polling, tmr.ALARM_AUTO, function() callbacks.sendData(sensorConfig.sensorId[key]) end)
tmr.create():alarm(1000, tmr.ALARM_SINGLE, function() callbacks.sendData(sensorConfig.sensorId[key]) end)
end
end
Printing "[sensorId_value]"
callbacks.sendData = function(sensorId)
local data = 1
print(sensorId .. " sent " .. data)
end
Printing properly ("OK" then "[sensorId_value] sent 0")
callbacks.sendData = function(sensorId)
local data = 1
print("OK")
print(sensorId .. " sent " .. data)
end
Printing properly ("[sensorId_value] sent 1")
callbacks.sendData = function(sensorId)
print(sensorId .. " sent 0")
end
In all examples sensorId is a variable, not a string, so unless sensorId = "sensorId" none of them should be printing "sensorId sent 0".
In the first example (all of them, actually) " sent " is a literal, it should output regardless of the value of data.
Shouldn't the second example print "[...] sent 1"?
Try using a variable name other than data, maybe there's some forward value confusion.

abas-ERP: How to create a dataset without using the .make-command

I need to create a dataset in a file that is not covered by the .make-command. How can I achieve this?
I tried it using the file-identifier you use in the .select-command and the correct group-identifier (e.g. group3). When run, it prompted "wrong group".
You can also use EDP or EPI.
Short example how to create a customer using EDP:
.type text xtedp xterr xtres xtsys
..
..: file containing the EDP commands
.file -TEMPNAME U|xtedp
..: file containing the error output of the edp command
.file -TEMPNAME U|xterr
..: file containing the id of the new customor
.file -TEMPNAME U|xtres
..
..: Create the edp command file containing two new customers
.input DATEI.F
.output new 'U|xtedp'
# hier you can write a comment for the edp file
#!database=0
#!group=1
#!action=new
#!password=yourpassword
#!charset=EKS
#!report=NUM
#!DONTCHANGE=-
#!TRANSACTION=1
# now we list all fields which we want to write
such#name#ans#plz#nort#str#
DOW#John Dow Ldt;#John Dow Ltd#12345#Someplace#Somestreet#
Max#Max Ldt;#Max Ltd#22345#Someplace2#Somestreet2#
..
..: close edp file
.output TERMINAL
..
..: Execute the edp command
.formula U|xtsys = "edpimport.sh " + " -t# -I " + 'U|xtedp' + " > " + 'U|xtrep' + " 2> " + 'U|xterr'
.system 'U|xtsys' background
..
..: G|mehr or G|success is "true" when the command could be executed successfully (on some abas-ERP versions G|success does not wort, use G|mehr)
.continue ERROR ? _G|success
.continue SHOW
!ERROR
..: Do something here!!
..
!SHOW
New customer(s) created:
.input -TEXT 'U|xtres'
.continue
The great benefit using edp is, that you can use transactions. If one operation fails, all transactions will be rolled back.
There is a workaround via .command
When the invisible-Property is set to 1, the mask doesn't become visible and the dataset is saved immediately.
You can use it as follows:
.formula xtCmd = "<File-Identifier> <new>, Group-Identifier ? param1=value1|param2=value2|[invisible]=1"
.command -WAIT -ID maskID 'U|xtCmd'

Resources