GameMaker: Studio

GameMaker: Studio

View Stats:
Aunt Tifa Jun 20, 2015 @ 9:21pm
Cannot fix malformed "switch" statement
So I am getting multiplayer set up for a game I am creating, and I am using this script to recieve packets. The only problem is that GM:S returns a "malformed 'switch' statement" error for what looks like no reason. I've looked in the Game Maker Docs and the forums for anything like this but to no avail, and I'm fairly sure this is a simple problem that needs the attention of someone with more experience.

//scr_recieved_packet(buffer,socket) var buffer = argument0; var socket = argument1; var msgid = buffer_read(buffer, buffer_u8); switch (msgid) { //Case statements go here... }
< >
Showing 1-3 of 3 comments
Blind Jun 20, 2015 @ 9:22pm 
you need at least one case
Aunt Tifa Jun 20, 2015 @ 9:23pm 
Originally posted by BBX:
you need at least one case
I knew this was a simple issue. Thanks!
Blind Jun 20, 2015 @ 9:24pm 
you can use the statement "case default" as a catch all if you can't anticipate all possible actions.
< >
Showing 1-3 of 3 comments
Per page: 1530 50

Date Posted: Jun 20, 2015 @ 9:21pm
Posts: 3