Weird Project Corruption

Report bugs. Post bug workarounds or fixes

Moderator: MSandro

Post Reply
User avatar
Calloway
Posts: 87
Joined: Apr 30th, '18, 00:28
Location: Eastern United States

Weird Project Corruption

Post by Calloway » Aug 6th, '19, 17:34

On Windows 10 Home 64 bit running GP Beta 0.82. Whenever I try and open this project I am presented with the debugger and a primitive fail saying the index is out of range. After resuming the task after that it states the first argument must be a string and then after running the project for a few minutes it'll crash with first argument must be a string repeating.

The code is very simple and I don't see why it would crash, maybe it saved wrong or something? Any help would be appreciated!

Code: Select all

module
moduleVariables true

defineClass stage morph

method initialize stage {
  self_setDraggable false
  self_setPosition 0 0
  self_createCostume (stageWidth) (stageHeight) (colorSwatch 255 255 255 255)
}
script 'stage' 54 74 {
whenBroadcastReceived 'go'
while true {
  if (and (and ((self_mouseX) < 175) ((self_mouseX) > -175)) (and ((self_mouseY) < -10) ((self_mouseY) > -60))) {
    self_setFont 'Symbol' 72
    self_drawText 'zthe junglez' (((self_getWidth) - (stringWidth 'zThe Junglez')) / 2) ((((self_getHeight) - (fontHeight)) / 2) - 50) (colorSwatch 56 56 56 255)
    self_fillRect (((self_getWidth) - ((self_getWidth) / 2)) / 2) (((self_getHeight) / 2) + 10) ((self_getWidth) / 2) 50 (colorSwatch 75 75 75 255) 16
    self_fillRect ((((self_getWidth) - ((self_getWidth) / 2)) / 2) + 2) (((self_getHeight) / 2) + 12) (((self_getWidth) / 2) - 4) (50 - 4) (colorSwatch 75 75 75 255) 16
    self_setFont 'Tahoma' 32
    self_drawText 'Play' (((self_getWidth) - (stringWidth 'Play')) / 2) ((((self_getHeight) - (fontHeight)) / 2) + 33) (colorSwatch 255 255 255 255)
    if (handIsDown) {
      broadcastAndWait 'clear'
      stopTask
    }
  } else {
    self_setFont 'Symbol' 72
    self_drawText 'zthe junglez' (((self_getWidth) - (stringWidth 'zThe Junglez')) / 2) ((((self_getHeight) - (fontHeight)) / 2) - 50) (colorSwatch 56 56 56 255)
    self_fillRect (((self_getWidth) - ((self_getWidth) / 2)) / 2) (((self_getHeight) / 2) + 10) ((self_getWidth) / 2) 50 (colorSwatch 75 75 75 255) 16
    self_fillRect ((((self_getWidth) - ((self_getWidth) / 2)) / 2) + 2) (((self_getHeight) / 2) + 12) (((self_getWidth) / 2) - 4) (50 - 4) (colorSwatch 255 255 255 255) 16
    self_setFont 'Tahoma' 32
    self_drawText 'Play' (((self_getWidth) - (stringWidth 'Play')) / 2) ((((self_getHeight) - (fontHeight)) / 2) + 33) (colorSwatch 56 56 56 255)
  }
  waitSecs
  initialize this
}
}

script 'stage' 486 50 {
whenBroadcastReceived 'clear'
initialize this
}

script 'stage' 650 67 {
method initialize stage {}
}


GameMenu.gpp
(8.24 KiB) Downloaded 8 times

User avatar
Calloway
Posts: 87
Joined: Apr 30th, '18, 00:28
Location: Eastern United States

Re: Weird Project Corruption

Post by Calloway » Aug 6th, '19, 17:37

I also sometimes will get a bad texture error repeating until crash when I save projects

JohnM
Posts: 379
Joined: Sep 11th, '15, 14:42

Re: Weird Project Corruption

Post by JohnM » Aug 6th, '19, 18:13

I haven't tried running the project but looking the code it appears that your project defines a shared variable named 'true'. It's possible that that GP is confusing that variable name with the literal boolean value 'true'.

That might not be the problem, just something to check...

User avatar
Calloway
Posts: 87
Joined: Apr 30th, '18, 00:28
Location: Eastern United States

Re: Weird Project Corruption

Post by Calloway » Aug 31st, '19, 04:31

JohnM wrote:
Aug 6th, '19, 18:13
I haven't tried running the project but looking the code it appears that your project defines a shared variable named 'true'. It's possible that that GP is confusing that variable name with the literal boolean value 'true'.

That might not be the problem, just something to check...
That's really weird, I never made a variable called true

Post Reply