Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 7 years ago.
Improve this question
def read_dbf(paste)
#Lendo a pasta
Dir.foreach(paste) { |name|
if(File.directory?(name))
pasteSub = paste+"/"+name
Dir.foreach(pasteSub) { |subname|
puts "Pasta: #{pasteSub}"
puts subname }
end
end
}
end
end
Error: syntax error, unexpected kEND
I tried to create a block within a block and I think given problem. I am listing the contents of the folder and case folder for the content they access and read the contents of the folder as well.
Problem happened when I put the "if"
Yes, you add if and miss some end there. Try to use some editor for show you unexpected end.
def read_dbf(paste)
#Lendo a pasta
Dir.foreach(paste) {|name|
if File.directory?(name)
pasteSub = paste+"/"+name
Dir.foreach(pasteSub) {|subname|
puts "Pasta: #{pasteSub}"
puts subname
}
end
}
end
Related
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 4 days ago.
Improve this question
local success = exports['car_dealer_number']:StartCarDealerNumber())
if success then
Wait(5000)
NetworkStartSynchronisedScene(HackKeypad['scenes'][3])
Wait(4000)
DeleteObject(usb)
DeleteObject(phone)
ClearPedTasks(ped)
hacking = false
busy = false
TriggerServerEvent('pacificheist:server:doorSync', index)
elseif not success then
Wait(5000)
NetworkStartSynchronisedScene(HackKeypad['scenes'][4])
Wait(4000)
DeleteObject(usb)
DeleteObject(phone)
ClearPedTasks(ped)
busy = false
hacking = false
end
end)
else
ShowNotification(Strings['need_this'] .. itemLabel)
end
end, Config['PacificHeist']['requiredItems'][7])
end
I tried everything I knew, deleting some stuff, adding some stuff.
When I'm trying to reset the script the error in client.lua pops up unexpected symbol near ')'. The client.lua file doesnt load because of this error
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 2 years ago.
Improve this question
Windows 32, Delphi XE5. Database from Component ACE: Absolute database.
Form Create Procedure worked ok upto few hours ago. Suddenly resulted in error:
Cannot open File"Error Code 3" Error message: Can not find the path specified. Error 30364.
I have read many discussion with the same or similar problem but none gave me a good hint to solve.
The Procedure code is:
Procedure TForm1.FormCreate(Sender: TObject);
begin
ABSDatabase1.DatabaseFilename:= ExtractFilePath(Application.ExeName)+'LibCat.ABS';
ABSDatabase1.Open;
// showmessage(ABSDatabase1.Databasefilename);
ABSTable1.TableName:='Cat';
ABSTable1.Open; // gives error
ABSTable1.Last;
GetAppVersionStr;
Form1.Caption:=Form1.Caption +': Books Catalogue, ver. ' + Versione;
end;
The database file is in the same folder as the Project exe file. Any path of the option file point to the same folder.
I cannot imagine what modication I did to get this error.
On a step by step debugging the Database opens regularly, but the open Table gives the error.
On Object Inspector for Database the FileName is specified as .\LibCat.abs
Solved.
It was really a silly reason:
I examined carefully the .dfm file and I found that on "Object Inspector" providing data to ABSDatabase1 I have written the name and put at the end of the string a carriage return and a new line. Of course these characters where not visible on ID, only on .dfm file.
I do not know why this additional keys caused the error, but as I cleared them the Form was regularly generated and the program run perfectly.
Hope this can be useful to someone else.
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 7 years ago.
Improve this question
Scenario:
STEP 1:
STEP 2:
STEP 3:
Problem Summarized:
I started working with swift and its basic concepts.
First, I tried making an array ab with multiple different typed elements (not sure if it should be called an array). Then I tried to test an index value ab[2].
After testing an index value successfully, I made a dictionary dictAbc where I used different indices ab[4] ab[6] pointing to its keys. It introduced an error as mentioned in STEP 1.
I tried capping ab[2] into a print function as mentioned in STEP 2, it removed the error
Then I removed print method and made STEP 3 code same as STEP 1, it doesn't produce any error now.
Code:
import UIKit
var str = "Hello, playground"
var num: Float64 = 4.00000000000000000000000000
print("\(num)")
let a = "Hello"
let b = 12786
let c = a + String(b)
var ab = [1221, 123123, 123123,123123,"asdasd", "adasdasd", 1263781.123]
ab[2]
var dictAbc = ["hello":ab[4], "let":ab[6]]
dictAbc["let"]
Project Navigator Screenshot
Note: Xcode Version 7.0 (7A220)
Is something wrong with Playground compiler?
This is because of how a Playground works: it tries to evaluate every expression as soon as you've finished typing.
So when you type this quickly:
ab[1]
No errors, but if you take your time and pause with the cursor inside the brackets:
ab[]
you will indeed get the cannot subscript a value of type '[NSObject]' with an index of type '()' error, but this is only a temporary error message due to the "real-time" nature of the Playground.
If the error is still there after having typed the index number, then to make it disappear you just have to "wake up" the Playground by adding an empty line somewhere, adding a space after the expression, or adding other code, of course. The Playground will then re-evaluate everything and will remove the false error.
This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.
Closed 9 years ago.
I'm getting this error when I run this code.
Parse error: syntax error, unexpected 'users_kudos_to_posts' (T_STRING)
The code.
if ($number > 0) {
$arr=explode(",",`$upvoted);
//If I comment out everything below I still get the error. But if I comment out
//the above code, then the error goes away.
if (in_array($primary_id, $arr)) {
array_push($arr, $primary_id);
$new_string = implode(",", $arr);
//the line below is where the parse error is pointing too.
if ($stmt2 = $mysqli->prepare("UPDATE `users_kudos_to_posts` SET `upvoted` = ?
WHERE `user_id` = ?")) {
$stmt2->bind_param('si', $new_string, $session_user_id);
$stmt2->execute();
$stmt2->close();
}
}
}
What's crazy is that I have other multiple prepared statements in the same page of code with the same sql statement except for a change in columns and they work yet this doesn't.
Also, I ran the sql statement in phpmyAdmin and it works.
Problem is this line:
$arr=explode(",",`$upvoted);
You have an extra backtick that doesn't belong there. It should be:
$arr=explode(",",$upvoted);
As StackOverflow's syntax highlighting highlights (heh), you've got an extra backtick in your explode statement in front of `$upvoted:
$arr=explode(",",`$upvoted);
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 9 years ago.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Improve this question
I've created custom 404 error pages for my symfony application, but they don't seem to work. In dev I see :
This request has been forwarded to a 404 error page by the action "blabla".
But in prod, the page is just blank; I get a 500 error.
In the logs, the error is :
PHP Parse error: syntax error, unexpected T_PUBLIC in /var/www/myproject/apps/myapp/modules/default/actions/actions.class.php on line 7
default/actions/actions.class.php is the following :
<?php
/**
* Error page for page not found (404) error
*
*/
public function executeError404()
{
}
public function executeSecure()
{
}
?>
I followed this tutorial on symfony-check.org
I found the answer all by myself :D
I'd forgotten part of the file :
class defaultActions extends sfActions
{
public function executeError404() {}
}