Topic:   Syntax error?   (Read 2936 times)


0 Members and 1 Guest are viewing this topic.

GMG Kurt


  • GMG-er

  • **


  • Posts: 682

  • Sorry for being such a noob
    • View Profile
Syntax error?
« on: May 01, 2011, 01: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)
Just your average Weekend Warrior.
Yes I know I have bad spelling, it's what makes me such a good programmer!

"Old art, weather magnificent or wretched, is always the raw material of new art. The artist's job, though, is to

Zoo


  • GMG Extraordinaire

  • ***


  • Posts: 1686
    • View Profile
    • My Bandcamp
Re: Syntax error?
« Reply #1 on: May 01, 2011, 01: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.
Kirby, your pudgy buddy from dream land, is back again on the game boy®!

GMG Kurt


  • GMG-er

  • **


  • Posts: 682

  • Sorry for being such a noob
    • View Profile
Re: Syntax error?
« Reply #2 on: May 01, 2011, 01: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.
Just your average Weekend Warrior.
Yes I know I have bad spelling, it's what makes me such a good programmer!

"Old art, weather magnificent or wretched, is always the raw material of new art. The artist's job, though, is to

Al Staffieri


  • GMG-er

  • **

  • no avatar

  • Posts: 451

  • I love GameMaker
    • View Profile
Re: Syntax error?
« Reply #3 on: May 01, 2011, 03: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.

GMG Kurt


  • GMG-er

  • **


  • Posts: 682

  • Sorry for being such a noob
    • View Profile
Re: Syntax error?
« Reply #4 on: May 02, 2011, 11:51:20 AM »
okay here's line 31:
LET area$ = space type
pco = player coordinate, by grid not pixels

Code: [Select]
area$ = MID$ array$ pco
Just your average Weekend Warrior.
Yes I know I have bad spelling, it's what makes me such a good programmer!

"Old art, weather magnificent or wretched, is always the raw material of new art. The artist's job, though, is to

Zoo


  • GMG Extraordinaire

  • ***


  • Posts: 1686
    • View Profile
    • My Bandcamp
Re: Syntax error?
« Reply #5 on: May 02, 2011, 01:59:04 PM »
String variables need to be in quotes. Lol, hope I solved your problem.
Kirby, your pudgy buddy from dream land, is back again on the game boy®!

GMG Kurt


  • GMG-er

  • **


  • Posts: 682

  • Sorry for being such a noob
    • View Profile
Re: Syntax error?
« Reply #6 on: May 03, 2011, 12: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.
Just your average Weekend Warrior.
Yes I know I have bad spelling, it's what makes me such a good programmer!

"Old art, weather magnificent or wretched, is always the raw material of new art. The artist's job, though, is to

Zoo


  • GMG Extraordinaire

  • ***


  • Posts: 1686
    • View Profile
    • My Bandcamp
Re: Syntax error?
« Reply #7 on: May 03, 2011, 03:03:15 PM »
Yep. Your welcome. I had that problem I while back too.
Kirby, your pudgy buddy from dream land, is back again on the game boy®!

GMG Kurt


  • GMG-er

  • **


  • Posts: 682

  • Sorry for being such a noob
    • View Profile
Re: Syntax error?
« Reply #8 on: May 04, 2011, 06:33:52 PM »
yep everything (except a non related glitch) is working fine. Thanks again Zoo
Just your average Weekend Warrior.
Yes I know I have bad spelling, it's what makes me such a good programmer!

"Old art, weather magnificent or wretched, is always the raw material of new art. The artist's job, though, is to