Search the Community
Showing results for tags 'array'.
-
Hi, How do I access a container variable stored in engine.world from engine.system? I usually copy containers by passing an array argument and using argument.copy(array) but how do I do it across system/world/editor? Eg: // System level namespace NetworkManager { // Need to access mVehicles data here.. Vehicles tempArr[0]; engine.world.call( "ExerciseManager::copyVehicles", tempArr ); } // World level namespace ExerciseManager { Vehicle mVehicles[0]; void copyVehicles( arg[] ) { arg.copy( mVehicles ); } } The engine.world.call does not accept array and using 'callv' instead was throwing error saying 'copyVehicles with 0 arguments cannot be found' (also, I do not want to pass array in callv due to the size limit of 8). What is the correct way of doing this? Thanks.
-
i'm still confused how to send a array to a function. say i have array ObjectMeshSkinned meshes[]; and i want to send to function void create_scene(ObjectMeshSkinned skinMeshes[]) { } when i do this, it give me error Interpreter::parse_expression(): arrays can't be used in expressions so how could i do this?
-
Hello! Simply as an example: ///////// Example 1 /////////// var arr:Array = new Array(); trace('Len: ' + arr.length); // Print: Len: 0 // Right! ///////// Example 2 /////////// var arr:Array = new Array("one"); trace('Len: ' + arr.length); // Print: Len: 0 // Error! ///////// Example 3 /////////// var arr:Array = new Array("one", "two"); trace('Len: ' + arr.length); // Print: Len: 2 // Right! Thank you.