• 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.

Mac OSX [RESOLVED] YYC Compiler - expecting a number (but not in VM Compiler)

B

bilouw

Guest
Hello guys,

I have code that runs fine on VM compiler. I juste found the YYC compiler, so i tried my code on it. It don't seems to have errors, but some behaviours are strange. For example, at the beginning of my game, i get the room index to spawn in a .sav file. So i read the value in a ds_list like this :

Code:
var r = saveinfo[? "checkpoint_room"];
the "r" variable is equal to 3 (number, not string).

Then, i use room_goto() function like this :

Code:
room_goto(r);
I don't know why, it throw me an error :

Code:
room_goto argument 1 incorrect type (undefined) expecting a Number (YYGI32)
I checked, the "r" variable is a number and it works fine with VM compiler. I tried, the real() and int64() to cast "r" variable to integer again. If i do this, the error is not anymore here but it doesn't go in the room with the id 3 (the value of r), but the first room instead ...

Do you know why the YYC compiler doesn't consider this variable as a number?

Thanks.
 
B

bilouw

Guest
Yes! The problem come from my "r" value that is undefined when i compile with YYC but DEFINED when i compile with VM. This "r" value is extract from data-structure (ds_map) filled by json. I don't know why this value is filled with VM compiler but not with YYC one.

SOLUTION : Ok so i found the problem. With YYC compiler, the sandbox folder of the project is different from the VM compiler (YYC makes a folder named with App ID). So it was taking an old json file present in App ID folder with different structure, and filled the map with it. That's why the value wasn't correct.
 
Last edited by a moderator:
Top