Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1]   Go Down

Author Topic: Small GM Error [Solved]  (Read 3355 times)

0 Members and 1 Guest are viewing this topic.

Ryuza

That one guy
Small GM Error [Solved]
« on: March 03, 2014, 03:46:31 am »
  • RyuKage2007
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 290
Hey, been a long time since I've been around but I figured I"d stop by and ask a quick GM question. It's been awhile since I've used GM and I'm still getting a bit used to Studio and encountered an error importing an old project of mine that I was gonna mess around with.
Code: [Select]
switch ctrl_menu.slot[16, 0] {
    case global.item[15, 1]: scr_weapon_bow() break;
    }
It's giving me the error: Case argument should be a constant.

It seems like it's probably something pretty obvious but I'm not really sure what. Anyone know what to do?

Edit: Got it working now, thanks Martijn!
« Last Edit: March 04, 2014, 01:48:35 am by Ryuza »
Logged
<- Koholint Island - MC Style  <- Link's Awakening Photo Recolors  <- Wind Waker 3D Resources <- Super Mario Bros Crossover
  • RyuKage2007's Youtube
Re: Small GM Error
« Reply #1 on: March 03, 2014, 05:46:45 pm »
  • *
  • Reputation: +16/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1633
I believe switch commands no longer work with non-constant values in Studio. Your case global.item[x,x] is variable. The compiler can't convert that to a constant value like for instance: case 5.
Logged

Ryuza

That one guy
Re: Small GM Error
« Reply #2 on: March 04, 2014, 01:47:27 am »
  • RyuKage2007
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 290
Ah, well that was simple enough, I got it working now, thanks! :D
Logged
<- Koholint Island - MC Style  <- Link's Awakening Photo Recolors  <- Wind Waker 3D Resources <- Super Mario Bros Crossover
  • RyuKage2007's Youtube
Pages: [1]   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.196 seconds with 43 queries.

anything