ENIGMA Forums
Outsourcing saves money => Issues Help Desk => Topic started by: The 11th plague of Egypt on June 08, 2014, 08:03:30 am
-
I'm trying get an old .gm6 project of mine to run in ENIGMA.
http://sandbox.yoyogames.com/games/147289/download
It seems to import fine, but when I try to run it, I get this error
Building for mode (0)
Cleaning up from previous executions
- Cleared parsed objects
- Cleared room entries
- Cleared shared locals list
- Cleared event info
Loading shared locals from extensions list
Location in memory of structure: 519cd0d8
Copying resources:
Copying sprite names [5]
Copying sound names [0]
Copying background names [1]
Copying path names [0]
Copying script names [18]
Copying shader names [0]
Copying font names [1]
Copying timeline names [0]
Copying object names [9]
Copying room names [2]
SYNTAX CHECKING AND PRIMARY PARSING:
18 Scripts:
Parsed `load_map': 13 locals, 0 globals
Parsed `draw_a_button': 12 locals, 0 globals
Parsed `negative_color': 0 locals, 0 globals
Parsed `point_line_distance': 0 locals, 0 globals
Parsed `segm2segm_dist': 0 locals, 0 globals
Parsed `cells_under_line': 1 locals, 0 globals
Parsed `limit_steering': 0 locals, 0 globals
Parsed `lines_intersection': 0 locals, 0 globals
Parsed `lineVSwalls': 0 locals, 0 globals
Parsed `first_reachable_node': 2 locals, 0 globals
Parsed `cell_units': 0 locals, 0 globals
Parsed `optimized_BFS': 1 locals, 0 globals
Parsed `find_walls_to_avoid': 0 locals, 0 globals
Parsed `find_units_to_avoid': 0 locals, 0 globals
Parsed `collision_move': 0 locals, 0 globals
Parsed `rectangleVScircle': 0 locals, 0 globals
Parsed `save_map': 4 locals, 0 globals
Parsed `mouse_over_button': 5 locals, 0 globals
"Linking" scripts
`Linking' 18 scripts in 5 passes...
Completing script "Link"
Linking `load_map':
Linking `draw_a_button':
Linking `negative_color':
Linking `point_line_distance':
Linking `segm2segm_dist':
Linking `cells_under_line':
Linking `limit_steering':
Linking `lines_intersection':
Linking `lineVSwalls':
Linking `first_reachable_node':
Linking `cell_units':
Linking `optimized_BFS':
Linking `find_walls_to_avoid':
Linking `find_units_to_avoid':
Linking `collision_move':
Linking `rectangleVScircle':
Linking `save_map':
Linking `mouse_over_button':
Done.
"Linking" timelines
`Linking' 0 timelines in 0 passes...
Completing timeline "Link"
Done.
9 Objects:
ob_vertex: 12 events:
Event[0]: Parsing 1 sub-events:
Check `ob_vertex::create... Done. Parse... Done.
Event[1]: Parsing 1 sub-events:
Check `ob_vertex::destroy... Done. Parse... Done.
Event[8]: Parsing 1 sub-events:
Check `ob_vertex::draw... Done. Parse... Done.
ob_creator: 12 events:
Event[0]: Parsing 1 sub-events:
Check `ob_creator::create... Done. Parse... Done.
Event[3]: Parsing 1 sub-events:
Check `ob_creator::step...Syntax error in object `ob_creator', Step event:0:
Line 295, position 28 (absolute 10683): Invalid assignment to function `connect'
Here the piece of code, line 295 is connect=1
if (dist<=vertex_radius) //if there is a vertex under the mouse pointer
{
if vertex_b!=vertex_a //if B is not the same as A
connect=1
else connect=0
}
Any idea what the problem is?
This is old code that only uses the semicolon ; in var statements.
-
Do you have a script named connect? What it's saying is there is a function somewhere called connect, so you can't use it as a variable name.
-
Do you have a script named connect? What it's saying is there is a function somewhere called connect, so you can't use it as a variable name.
No, I don't.
(http://s30.postimg.org/6e2n59pv1/2014_06_08_16_42_25_Cheesee_finder_1_0a_gm6_Ga.jpg) (http://postimg.org/image/6e2n59pv1/)
Moreover, the var is declared in line 1.
var temp_map_name,vertex,vertex_a,vertex_b,create_vertex_a,node,node_a,node_b,create_node_a,dist,dist1,dist2,pos,connect;
-
This is probably because we still aren't using exclusively namespace enigma_user for functions. If I had to guess, connect is some kind of sockets function someone unwittingly included in a header somewhere. The fewer includes we have from the engine, the better, so I'd prefer that be removed even if the ultimate solution is forcing functions to be read from enigma_user.
-
I already considered that Josh and Berkeley Sockets does have a connect() function. However, Networking Systems are set to none by default, 11th please make sure under Build->Settings->"API" that Networking Systems is set to "None"
-
I already considered that Josh and Berkeley Sockets does have a connect() function. However, Networking Systems are set to none by default, 11th please make sure under Build->Settings->"API" that Networking Systems is set to "None"
Actually, it is.
(http://s29.postimg.org/ngeq5jrcj/2014_06_09_11_36_48_Lateral_GM_new_game.jpg) (http://postimg.org/image/ngeq5jrcj/)
-
It doesn't matter what declared "connect" as a function, the point is that something is. The user-side solution is to just name the variable something else. The ENIGMA-side solution is to only use functions from namespace enigma_user, but I'm not sure we're ready to make that jump.
-
My only concern is Josh that it could be getting included incorrectly or scoped improperly, by which I am referring to the connect() function.
Anyway, oddly the function does not get syntax highlighted, so it is not in namespace enigma_user, and clearly not in namespace enigma or we wouldn't be having this issue. It could also be coming from OpenAL because it's dll is showing up when I regex for "connect" other than that only Berkeley Sockets shows.
Also I have tested and have reproduced this bug in an empty game with 1 object with the following code.
var connect;
connect = 5;
And received the same function assignment error as the 11th plague.
-
It doesn't matter what declared "connect" as a function, the point is that something is. The user-side solution is to just name the variable something else. The ENIGMA-side solution is to only use functions from namespace enigma_user, but I'm not sure we're ready to make that jump.
Why can't you just do it the GM way and create name prefixes? E.g. I have an object named "object", and the parser/compiler/whateveryoucallit prepends "obj_" to that object name. I feel like that would be easier than trying to put it all in a namespace.
-
We already do that, dazappa. This relates to naming a variable the same thing as a function. No one would be complaining if the variable behind the problem were called "instance_destroy" instead of "connect," but unfortunately, "connect" names a function as well.
-
We already do that, dazappa. This relates to naming a variable the same thing as a function. No one would be complaining if the variable behind the problem were called "instance_destroy" instead of "connect," but unfortunately, "connect" names a function as well.
I think he mean "connect" needs to be changed into "obj_object_connect", so there would be no conflict. But we do it partially, but assigning function to variables should be possible, so resolving all these issues with changing the variables while parsing is not really the solution.
-
use a prefix.
_connect works.
example _connect = 1;
Works fine here.
-
That is just like saying to use a different variable name. The issue though, is that "connect" should probably be available. It's possible that someone has included some kind of a header in enigma_user namespace.
-
That is just like saying to use a different variable name. The issue though, is that "connect" should probably be available. It's possible that someone has included some kind of a header in enigma_user namespace.
Using _connect is much closer to the original variable than using a different variable.
BTW, could this be caused by BSnet.h / BSnet.cpp, example
if (!server) { //client
if (connect(s, sinf->ai_addr, sinf->ai_addrlen) == SOCKET_ERROR)
-
No he has networking systems set to none, meaning the makefile is never even processed for that system, so no. I'm certain the conflict is coming from OpenAL.
-
No he has networking systems set to none, meaning the makefile is never even processed for that system, so no. I'm certain the conflict is coming from OpenAL.
There is "connect" (alone) reference in OpenAL includes or source...
-
No nevermind setting audio system to none doesn't fix it either. So it is coming from somewhere in universal system or something.
-
Thank you for looking into this guys, I really appreciate it.