Link to home
Start Free TrialLog in
Avatar of Samuel-AMC
Samuel-AMC

asked on

Error! Failed to open config.lua with errno 2

Hello everyone, i will try to be as specific as possible
Angry Birds for PC is the game with which i am having problems with,
This is the error i am getting when i try to execute or run the shortcut game:

---------------------------
Error!
---------------------------
Failed to open config.lua with errno 2
---------------------------
OK  
---------------------------

But i'll add the reason why i may be having this problem...
Shell "C:\Program Files (x86)\AngryBirds\AngryBirds.exe", vbMaximizedFocus
This line of code is in Visual Basic, so if i run the game directly, it opens without any
problem, but if i run it from my code i get the error i described.

The weird thing is that the other two games from Rovio open fine with no errors.
There are a few things that i have tried but nothing seems to work. like removing
vbMaximizedFocus, also editing the config.lua file, recreating the same file, etc.
Any help, suggestion or anything will be very appreciate, thanks in advance.
Avatar of Luis Pérez
Luis Pérez
Flag of Spain image

If you run the game from a direct link from desktop, are you sure that the direct link is pointing to AngryBirds.exe? Maybe it's pointing to another .exe or .bat file.
Avatar of Samuel-AMC
Samuel-AMC

ASKER

Hi RolandDeschain,

Yes, i am 100% for sure that everything is okay, otherwise i won't be getting
that error which is coming from the executable itself.
Try using the Win32 API function ShellExecute instead of VB6 function Shell. Here you got several examples of using ShellExecute in vb6:

http://www.developerfusion.com/article/9/shell-and-shellexecute-function/2/

Hope that helps.
Thanks Roland, i used this:ShellExecute 0&, vbNullString, """ patch here""", vbNullString, vbNullString, vbNormalFocus
but it doesn't work :-(
Try this:

ShellExecute 0&, vbNullString, "C:\Program Files (x86)\AngryBirds\AngryBirds.exe", vbNullString, "C:\Program Files (x86)\AngryBirds", 1

And post the results.
---------------------------
Microsoft Visual Basic
---------------------------
Compile error:

Sub or Function not defined
---------------------------
OK   Help  
---------------------------

It point to this: "ShellExecute" which is the beggining of the line of code.
ASKER CERTIFIED SOLUTION
Avatar of Luis Pérez
Luis Pérez
Flag of Spain image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hey WooooooooooooW!!! It work!!! ^_^ Wonderfull
Thank You Very Much Roland
You're welcome!! We're here to help.

Happy programming!
Yeah!!! Thank You Again ^_^