0

嗨,我已经在这方面工作了一段时间,但没有成功。我正在尝试向我的 Native Windows 8 游戏的动态磁贴发送一个简单的通知。为了习惯它,我尝试使用文档中提到的示例:

var expiryTime;
expiryTime = date_current_datetime();
expiryTime = date_inc_minute(expiryTime, 5);
win8_livetile_notification_begin("TileSquarePeekImageAndText01");
win8_livetile_notification_expiry(expiryTime);
win8_livetile_notification_tag("tag0");
win8_livetile_notification_text_add("Current Score = " + score);
win8_livetile_notification_image_add("ms-appx:///" + working_directory + "ScoreTile.png");
win8_livetile_notification_end();

现在这段代码使我的应用程序崩溃。有人可以告诉我如何发布磁贴通知以及我们应该将图像放在哪里。现在我在 Included Files 文件夹中有图像。

4

1 回答 1

2

score 是一个实数值,而不是一个字符串,所以你必须写:

win8_livetile_notification_text_add("Current Score = " + string(score));

GameMaker 中没有类型转换,而且从来没有。

于 2013-08-07T11:42:49.097 回答