Game Maker's Garage Forum

Game Creation => GameMaker => Topic started by: GMG Kurt on May 01, 2011, 04:22:46 PM

Title: Syntax error?
Post by: GMG Kurt on May 01, 2011, 04:22:46 PM
I've started an RPG since I'm almost done with TRON, and have made some headway, but have encountered an inexplicable syntax error.
http://www.mediafire.com/download.php?ol16auqo4kyir6e
it's in line 30:   pco = pco + nx
LET
pco = player coordinates (used just like the arrayNum in Al's 'How to Fake an Array')
nx = new x value by grid not pixels (where the player will move if it can)
Title: Re: Syntax error?
Post by: Zoo on May 01, 2011, 04:28:03 PM
If your using Grid nav, with silver's sprites, Instead of making each map sprite a different picture, load the whole tileset into GM on two or three cards, and copy-paste tiles on to the map. It saves a lot of time in photoshop, and memory on your computer. Also saves room in your game's folder.
Also, I import the blank map and just copy paste that when I need it.
Title: Re: Syntax error?
Post by: GMG Kurt on May 01, 2011, 04:41:11 PM
the reason I have all of them like that is because each house was going to have a different interior, and instead of using cards to portray each interior there's one card that will have a few generic designs it can create with sprites. It isn't started yet, but you can check out the beginnings in card 11.
Title: Re: Syntax error?
Post by: Al Staffieri on May 01, 2011, 06:33:25 PM
only looked at it quickly. I'll have more time tomorrow. Because you have a line near the beginning that takes up two lines (the array line), the actual error is on line 31.
Title: Re: Syntax error?
Post by: GMG Kurt on May 02, 2011, 02:51:20 PM
okay here's line 31:
LET area$ = space type
pco = player coordinate, by grid not pixels

Code: [Select]
area$ = MID$ array$ pco
Title: Re: Syntax error?
Post by: Zoo on May 02, 2011, 04:59:04 PM
String variables need to be in quotes. Lol, hope I solved your problem.
Title: Re: Syntax error?
Post by: GMG Kurt on May 03, 2011, 03:24:41 PM
THANK YOU! That actually worked! I thought it wasn't necessary for one word strings! it was on line 32 because it counted the array as two extra lines. there was the initial
Code: [Select]
array$ =
and then the text and text overflow. Thanks again Zoo.
Title: Re: Syntax error?
Post by: Zoo on May 03, 2011, 06:03:15 PM
Yep. Your welcome. I had that problem I while back too.
Title: Re: Syntax error?
Post by: GMG Kurt on May 04, 2011, 09:33:52 PM
yep everything (except a non related glitch) is working fine. Thanks again Zoo