Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

iOS and MacOS / Fails to compile on MAC - Compiles ok on Windows

Author
Message
yoda333
5
Years of Service
User Offline
Joined: 3rd Apr 2012
Location:
Posted: 13th Aug 2015 13:14
Hi to the forum members.

This compiles ok when added as one continuous line in Windows AppGameKit but fails to compile on the MAC - Can anyone assist.

elseif jokhit = 1 and (getspritevisible (100) = 0 and getspritevisible (101) = 0 and getspritevisible (102) = 0 and getspritevisible (103) = 0 and getspritevisible (104) = 0 and getspritevisible (105) = 0 and getspritevisible (106) = 0 and getspritevisible (107) = 0 and getspritevisible (108) = 0 and getspritevisible (109) = 0 and getspritevisible (110) = 0 and getspritevisible (111) = 0 and getspritevisible (112) = 0 and getspritevisible (102) = 0 and getspritevisible (113) = 0 and getspritevisible (114) = 0 and getspritevisible (115) = 0 and getspritevisible (116) = 0 and getspritevisible (117) = 0 and getspritevisible (118) = 0 and getspritevisible (119) = 0 and getspritevisible (120) = 0 and getspritevisible (121) = 0 and getspritevisible (122) = 0 and getspritevisible (123) = 0 and getspritevisible (124) = 0 and getspritevisible (125) = 0 and getspritevisible (126) = 0 and getspritevisible (127) = 0 and getspritevisible (128) = 0 and getspritevisible (129) = 0 and getspritevisible (130) = 0 and getspritevisible (131) = 0 and getspritevisible (132) = 0 and getspritevisible (133) = 0 and getspritevisible (134) = 0 and getspritevisible (135) = 0 and getspritevisible (136) = 0 and getspritevisible (137) = 0 and getspritevisible (138) = 0 and getspritevisible (139) = 0 and getspritevisible (140) = 0 and getspritevisible (141) = 0 and getspritevisible (142) = 0 and getspritevisible (143) = 0 and getspritevisible (144) = 0 and getspritevisible (145) = 0 and getspritevisible (146) = 0 and getspritevisible (147) = 0 and getspritevisible (148) = 0 and getspritevisible (149) = 0 and getspritevisible (150) = 0 and getspritevisible (151) = 0) Thanks yoda333
yoda333
5
Years of Service
User Offline
Joined: 3rd Apr 2012
Location:
Posted: 14th Aug 2015 00:24
This line is now and still fails to compile

elseif jokhit = 1 and getspritevisible (100) = 0 and getspritevisible (101) = 0 and getspritevisible (102) = 0 and getspritevisible (103) = 0 and getspritevisible (104) = 0 and getspritevisible (105) = 0 and getspritevisible (106) = 0 and getspritevisible (107) = 0 and getspritevisible (108) = 0 and getspritevisible (109) = 0 and getspritevisible (110) = 0 and getspritevisible (111) = 0 and getspritevisible (112) = 0 and getspritevisible (113) = 0 and getspritevisible (114) = 0 and getspritevisible (115) = 0 and getspritevisible (116) = 0 and getspritevisible (117) = 0 and getspritevisible (118) = 0 and getspritevisible (119) = 0 and getspritevisible (120) = 0 and getspritevisible (121) = 0 and getspritevisible (122) = 0 and getspritevisible (123) = 0 and getspritevisible (124) = 0 and getspritevisible (125) = 0 and getspritevisible (126) = 0 and getspritevisible (127) = 0 and getspritevisible (128) = 0 and getspritevisible (129) = 0 and getspritevisible (130) = 0 and getspritevisible (131) = 0 and getspritevisible (132) = 0 and getspritevisible (133) = 0 and getspritevisible (134) = 0 and getspritevisible (135) = 0 and getspritevisible (136) = 0 and getspritevisible (137) = 0 and getspritevisible (138) = 0 and getspritevisible (139) = 0 and getspritevisible (140) = 0 and getspritevisible (141) = 0 and getspritevisible (142) = 0 and getspritevisible (143) = 0 and getspritevisible (144) = 0 and getspritevisible (145) = 0 and getspritevisible (146) = 0 and getspritevisible (147) = 0 and getspritevisible (148) = 0 and getspritevisible (149) = 0 and getspritevisible (150) = 0 and getspritevisible (151) = 0
yoda333
5
Years of Service
User Offline
Joined: 3rd Apr 2012
Location:
Posted: 14th Aug 2015 00:37
Hi - Ive modified my source. To This

IF GETSPRITECOLLISION(700,152)=1 and jokhit = 1 and getspritevisible (100) = 0 and getspritevisible (101) = 0 and getspritevisible (102) = 0 and getspritevisible (103) = 0 and getspritevisible (104) = 0 and getspritevisible (105) = 0 and getspritevisible (106) = 0 and getspritevisible (107) = 0 and getspritevisible (108) = 0 and getspritevisible (109) = 0 and getspritevisible (110) = 0 and getspritevisible (111) = 0 and getspritevisible (112) = 0 and getspritevisible (113) = 0 and getspritevisible (114) = 0 and getspritevisible (115) = 0 and getspritevisible (116) = 0 and getspritevisible (117) = 0 and getspritevisible (118) = 0 and getspritevisible (119) = 0 and getspritevisible (120) = 0 and getspritevisible (121) = 0 and getspritevisible (122) = 0 and getspritevisible (123) = 0 and getspritevisible (124) = 0 and getspritevisible (125) = 0 and getspritevisible (126) = 0 and getspritevisible (127) = 0 and getspritevisible (128) = 0 and getspritevisible (129) = 0
printc("Winner")
endif

Which compiles but if the line is any longer than this the compile fails.
Ancient Lady
13
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 10th Oct 2015 22:02
I would suggest that you simplify that line.

Guessing from the line, you have sprites that are made invisible when something happens.

Instead of checking every single sprite in that line, try something like setting a global variable named something like 'still_visible' (using appropriate Tier 1 typing) to the number of sprites that need to be cleared. Then, when a sprite is made invisible, reduce set_visible by one. If a sprite can later be made visible again, increase set_visible by one.

Then your If statement could look like this:
+ Code Snippet
Cheers,
Ancient Lady
yoda333
5
Years of Service
User Offline
Joined: 3rd Apr 2012
Location:
Posted: 12th Dec 2015 07:32
Hi Ancient Lady - Thanks for the reply. I will give it a go.

Login to post a reply

Server time is: 2017-09-19 14:30:55
Your offset time is: 2017-09-19 14:30:55