Please login or register.

Login with username, password and session length
Advanced search  

News:

Forum rules - please read before posting, it can save you a lot of time.

Author Topic: Call to undefined method "GoExclusive" issue on iOS  (Read 3054 times)

0 Members and 1 Guest are viewing this topic.

Dan Peach

  • Occasional poster
  • **
  • Karma: 4
  • Offline Offline
  • Posts: 95
    • View Profile
    • Viperante - Game Development
Call to undefined method "GoExclusive" issue on iOS
« on: November 21, 2012, 03:42:09 PM »

Hi,

I have a problem on iOS that doesn't exist when running the game on Windows. The following "scene_init" script presents no errors in ProjectMan or when running the game in Windows. But when running it in iOS I get a "script compiler" error on line 50 - call to undefined method "GoExclusive". The script is supposed to load specific windows depending on specific variables. Simple stuff. I can't see anything wrong it. Can anyone else? Thanks. :)

Code: WME Script
  1.  
  2. global InventoryButton;
  3. global MenuButton;
  4. global Exiting;
  5. global DbComputerSection;
  6. global DbComputerBrowserPage;
  7. global DbComputerDatabasePage;
  8. global BrowserArray;
  9. global BrowserArrayPos;
  10. var DbComputerWindow;
  11. var Background = Scene.GetNode("background");
  12.  
  13. InventoryButton.Visible = false;
  14. MenuButton.Visible = false;
  15.  
  16. if(BrowserArray==null)
  17.  {
  18.   BrowserArray = new Array("blank");
  19.   BrowserArrayPos = 1;
  20.  }
  21.  
  22. if(DbComputerSection==null) DbComputerSection = "database";
  23. if(DbComputerDatabasePage==null) DbComputerDatabasePage = "0097_details";
  24. if(DbComputerBrowserPage==null) DbComputerBrowserPage = "blank";
  25.  
  26. if(Exiting)
  27.  {
  28.   Exiting = false;
  29.   Game.ChangeScene("scenes\processing_room\processing_room_desk_001_cu\processing_room_desk_001_cu.scene");
  30.  }
  31.  
  32. else
  33.  {
  34.   if(DbComputerSection=="database")
  35.    {
  36.     Background.SetSprite("scenes\processing_room\database_computer\sprites\db_background.jpg");
  37.         DbComputerWindow = Game.LoadWindow("data\scenes\processing_room\database_computer\windows\" + DbComputerDatabasePage + "_window.window");
  38.    }
  39.   else if(DbComputerSection=="browser")
  40.    {
  41.     Background.SetSprite("scenes\processing_room\database_computer\sprites\browser_background.jpg");
  42.         DbComputerWindow = Game.LoadWindow("data\scenes\processing_room\database_computer\windows\" + DbComputerBrowserPage + "_window.window");
  43.    }
  44.   else if(DbComputerSection=="search")
  45.    {
  46.     Background.SetSprite("scenes\processing_room\database_computer\sprites\search_background.jpg");
  47.         DbComputerWindow = Game.LoadWindow("scenes\processing_room\database_computer\windows\search_window.window");
  48.    }
  49.   DbComputerWindow.Center;
  50.   DbComputerWindow.GoExclusive();
  51.   Game.UnloadObject(DbComputerWindow);
  52.   Game.ChangeScene("scenes\processing_room\database_computer\database_computer.scene", false, false);
  53.  }
« Last Edit: November 21, 2012, 03:45:52 PM by Dan Peach »
Logged

2.0

  • Regular poster
  • ***
  • Karma: 4
  • Offline Offline
  • Posts: 217
    • View Profile
Re: Call to undefined method "GoExclusive" issue on iOS
« Reply #1 on: November 21, 2012, 05:56:14 PM »

Hi,

Here is a strange/wrong string 49:

Code: WME Script
  1. DbComputerWindow.Center;

I think it's need to be:

Code: WME Script
  1. DbComputerWindow.Center();

Also maybe

Code: WME Script
  1. DbComputerWindow = Game.LoadWindow("...");


not worked properly and the DbComputerWindow have the null value? Check it, for example.


Hi,

I have a problem on iOS that doesn't exist when running the game on Windows. The following "scene_init" script presents no errors in ProjectMan or when running the game in Windows. But when running it in iOS I get a "script compiler" error on line 50 - call to undefined method "GoExclusive". The script is supposed to load specific windows depending on specific variables. Simple stuff. I can't see anything wrong it. Can anyone else? Thanks. :)

Code: WME Script
  1.  
  2. global InventoryButton;
  3. global MenuButton;
  4. global Exiting;
  5. global DbComputerSection;
  6. global DbComputerBrowserPage;
  7. global DbComputerDatabasePage;
  8. global BrowserArray;
  9. global BrowserArrayPos;
  10. var DbComputerWindow;
  11. var Background = Scene.GetNode("background");
  12.  
  13. InventoryButton.Visible = false;
  14. MenuButton.Visible = false;
  15.  
  16. if(BrowserArray==null)
  17.  {
  18.   BrowserArray = new Array("blank");
  19.   BrowserArrayPos = 1;
  20.  }
  21.  
  22. if(DbComputerSection==null) DbComputerSection = "database";
  23. if(DbComputerDatabasePage==null) DbComputerDatabasePage = "0097_details";
  24. if(DbComputerBrowserPage==null) DbComputerBrowserPage = "blank";
  25.  
  26. if(Exiting)
  27.  {
  28.   Exiting = false;
  29.   Game.ChangeScene("scenes\processing_room\processing_room_desk_001_cu\processing_room_desk_001_cu.scene");
  30.  }
  31.  
  32. else
  33.  {
  34.   if(DbComputerSection=="database")
  35.    {
  36.     Background.SetSprite("scenes\processing_room\database_computer\sprites\db_background.jpg");
  37.         DbComputerWindow = Game.LoadWindow("data\scenes\processing_room\database_computer\windows\" + DbComputerDatabasePage + "_window.window");
  38.    }
  39.   else if(DbComputerSection=="browser")
  40.    {
  41.     Background.SetSprite("scenes\processing_room\database_computer\sprites\browser_background.jpg");
  42.         DbComputerWindow = Game.LoadWindow("data\scenes\processing_room\database_computer\windows\" + DbComputerBrowserPage + "_window.window");
  43.    }
  44.   else if(DbComputerSection=="search")
  45.    {
  46.     Background.SetSprite("scenes\processing_room\database_computer\sprites\search_background.jpg");
  47.         DbComputerWindow = Game.LoadWindow("scenes\processing_room\database_computer\windows\search_window.window");
  48.    }
  49.   DbComputerWindow.Center;
  50.   DbComputerWindow.GoExclusive();
  51.   Game.UnloadObject(DbComputerWindow);
  52.   Game.ChangeScene("scenes\processing_room\database_computer\database_computer.scene", false, false);
  53.  }
« Last Edit: November 21, 2012, 06:00:37 PM by 2.0 »
Logged

Dan Peach

  • Occasional poster
  • **
  • Karma: 4
  • Offline Offline
  • Posts: 95
    • View Profile
    • Viperante - Game Development
Re: Call to undefined method "GoExclusive" issue on iOS
« Reply #2 on: November 21, 2012, 07:25:57 PM »

Thanks for the suggestions. :)

I've removed the "DbComputerWindow.Center;" line, but that has not solved the problem.

This script works exactly as it should in Windows, just not in iOS, so the problem must lie there.

I suspect the problem is to do with these lines:

Code: WME Script
  1.  
  2. DbComputerWindow = Game.LoadWindow("data\scenes\processing_room\database_computer\windows\" + DbComputerDatabasePage + "_window.window");

I have similar scripts to this which load windows, and which work fine on iOS, but they contain the full paths to the windows instead of the way I've done it above. So, I think that's the problem.

But why should it not work?

2.0

  • Regular poster
  • ***
  • Karma: 4
  • Offline Offline
  • Posts: 217
    • View Profile
Re: Call to undefined method "GoExclusive" issue on iOS
« Reply #3 on: November 21, 2012, 09:06:37 PM »

Cause of buggy port, I think.  Abnormal bug you described is not single. For example, I had a crash of the application (only on ios devices, even not on ios emulator) when I tried to use entity.Scale = smth. The solution has been in using entity.Scalable = true before the each call.
So I hope Mnemonic continues of patching of this port :)

Also I think you can try to make something similar to:

Code: WME Script
  1.  
  2. var path = new String("data\scenes\processing_room\database_computer\windows\" + DbComputerDatabasePage + "_window.window");
  3.  
  4. DbComputerWindow = Game.LoadWindow(path);

If it possible, get us results of your experiments on this issue.


Thanks for the suggestions. :)

I've removed the "DbComputerWindow.Center;" line, but that has not solved the problem.

This script works exactly as it should in Windows, just not in iOS, so the problem must lie there.

I suspect the problem is to do with these lines:

Code: WME Script
  1.  
  2. DbComputerWindow = Game.LoadWindow("data\scenes\processing_room\database_computer\windows\" + DbComputerDatabasePage + "_window.window");

I have similar scripts to this which load windows, and which work fine on iOS, but they contain the full paths to the windows instead of the way I've done it above. So, I think that's the problem.

But why should it not work?
« Last Edit: November 22, 2012, 12:07:20 AM by 2.0 »
Logged

ciberspace

  • Regular poster
  • ***
  • Karma: 1
  • Offline Offline
  • Gender: Male
  • Posts: 113
    • View Profile
    • Tele Juego
Re: Call to undefined method "GoExclusive" issue on iOS
« Reply #4 on: November 22, 2012, 08:25:16 PM »

may be the blank spaces

"data \ escenas \
       x x          x

sorry 8)
« Last Edit: November 22, 2012, 08:43:44 PM by ciberspace »
Logged

Dan Peach

  • Occasional poster
  • **
  • Karma: 4
  • Offline Offline
  • Posts: 95
    • View Profile
    • Viperante - Game Development
Re: Call to undefined method "GoExclusive" issue on iOS
« Reply #5 on: November 22, 2012, 11:55:18 PM »

Well, I think you're right about it being a bug because I couldn't get it to work the way it was originally written. :(

So, I rewrote it and include the full path to each specific window for each specific value of the "DbComputerDatabasePage" variable, which was quite tedious work.  ;D

Works fine now though so that's good.

@2.0
I didn't see your edit until now - that's a good suggestion, which makes sense. I'll try that I think, and report back. :)
« Last Edit: November 23, 2012, 12:01:49 AM by Dan Peach »
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5677
    • View Profile
    • Dead:Code Site
Re: Call to undefined method "GoExclusive" issue on iOS
« Reply #6 on: November 23, 2012, 08:42:14 AM »

"data\scenes\processing_room\database_computer\windows\" seems to be wrong. Path names in WME should NEVER contain the package name (data). I doubt it works in Windows either when running the compiled version of the game.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Dan Peach

  • Occasional poster
  • **
  • Karma: 4
  • Offline Offline
  • Posts: 95
    • View Profile
    • Viperante - Game Development
Re: Call to undefined method "GoExclusive" issue on iOS
« Reply #7 on: November 23, 2012, 01:47:07 PM »

Ahhhh thanks Mnemonic - you're right. I was testing the original code in debug mode only in ProjectMan. I've changed it back to the original, taken out the "data" in the paths, and now it works fine in iOS. :)

Apologies for thinking it was a bug, and thanks to everyone for the help. :)
« Last Edit: November 23, 2012, 01:49:28 PM by Dan Peach »
Logged
 

Page created in 0.892 seconds with 23 queries.