• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Android Function "ds_grid_get" does not compile for Android export

Status
Not open for further replies.
M

minoush82

Guest
Hello,

I use the function
ds_grid_get()
in my code with 3 arguments as specified in the documentation. The following is a code extract from my program.
ds_grid_get(obj_persistent_score_table.score_sheet,0,i)
But when I compile to Android/YYC I get the error:
jni/libyoyo/../../gml_Object_obj_button_submit_answer_Alarm_2.gml.cpp:94:6: error: no matching function for call to 'YYGML_ds_grid_get'
if ((YYGML_ds_grid_get((int)((int)/* First usage */o3000000000_score_sheet.asReal()),0,(int)((int)/* local */local_i.asReal())) == YYGML_CallLegacyFunction(pSelf,pOther,__ret1__,1,g_FUNC_string.val,__pArg1369__))){
^~~~~~~~~~~~~~~~~
X://yyc/include\YYGML.h:269:21: note: candidate function not viable: requires 4 arguments, but 3 were provided
YYCEXTERN YYRValue& YYGML_ds_grid_get( YYRValue& _result, int _index, int _x, int _y);
The function
ds_grid_set()
with 4 arguments compiles just fine for Android.

Any idea what's going on?

Thanks.
 

Mert

Member
Alternatively, you can use gridname[# x,y].
Edit : # is the accessor for ds_grids. You can write to/read from a ds_grid with this.

Code:
gridname[# x,y] = 24
Code:
var data = gridname[# x,y];

show_debug_message(data);
It's not a solution for ds_grid_set, but does the same thing. Does not impact negatively on performance
 
M

minoush82

Guest
Thank you. I have replaced all occurrences of
ds_grid_get(grid,i.j)
with
grid[# i,j]
but I am getting the same compile errors. I guess both ways of expressing grid access boil down to the same thing eventually.

So my problem remains unsolved :-(
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
What IDE and Runtime versions are you using? ds_grid_set/get should work fine on all platforms.
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
You need to update the IDE... current one is 2.2.1.375 http://gms.yoyogames.com/ReleaseNotes.html

Once you've done that try again.

EDIT: quick search shows that the IDE version you are using is a common pirate version. As such you are banned from the GMC as we do not permit help for users with pirated software. If you think this is an error, please contact the YoYo Games helpdesk with your licenced email account and we will re-admit you to the forums.
 
Status
Not open for further replies.
Top