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: [Request / Solved] Cannot compare arguements....  (Read 4077 times)

0 Members and 1 Guest are viewing this topic.
[Request / Solved] Cannot compare arguements....
« on: May 01, 2006, 11:51:10 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 448
What the hell does it mean when it say " cannot compare arguements" ?
« Last Edit: February 24, 2012, 04:59:22 pm by Niek »
Logged
Re: Cannot compare arguements....
« Reply #1 on: May 01, 2006, 11:53:52 pm »
  • =/
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 2284
Its means its broken and has to be fixed. :D
Logged
Re: Cannot compare arguements....
« Reply #2 on: May 01, 2006, 11:54:23 pm »
  • Fear my Blades
  • *
  • Reputation: +3/-0
  • Offline Offline
  • Gender: Male
  • Posts: 562
Probably that you're trying to compare a string to a number.
Logged

I've done it (sorta)!  Bloom Lighting in GameMaker, and 3D mode too!  Check out the awesome Screen Saver.
  • Kousou Games
Re: Cannot compare arguements....
« Reply #3 on: May 01, 2006, 11:57:34 pm »
  • =/
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 2284
The problem I have with this is its not covered in the Gm manuel and I have never gotten that error before.
Logged
Re: Cannot compare arguements....
« Reply #4 on: May 01, 2006, 11:59:22 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 448
heres the code that its saying this about:
if global.poweredup= false
{
if global.dir='up' {sprite_index=spr_links_sword_up_start; depth=1}
if global.dir='down' {sprite_index=spr_links_sword_down_start; depth=-1}
if global.dir='left' {sprite_index=spr_links_sword_left_start; depth=-1}
if global.dir='right' {sprite_index=spr_links_sword_right_start; depth=-1}
}

if global.poweredup= true
{
if global.dir='up' {sprite_index=spr_links_sword_up_power; depth=1}
if global.dir='down' {sprite_index=spr_links_sword_down_power; depth=-1}
if global.dir='left' {sprite_index=spr_links_sword_left_power; depth=-1}
if global.dir='right' {sprite_index=spr_links_sword_right_power; depth=-1}
}
Logged
Re: Cannot compare arguements....
« Reply #5 on: May 02, 2006, 12:02:15 am »
  • Fear my Blades
  • *
  • Reputation: +3/-0
  • Offline Offline
  • Gender: Male
  • Posts: 562
heres the code that its saying this about:
if global.poweredup= false
{
if global.dir='up' {sprite_index=spr_links_sword_up_start; depth=1}
if global.dir='down' {sprite_index=spr_links_sword_down_start; depth=-1}
if global.dir='left' {sprite_index=spr_links_sword_left_start; depth=-1}
if global.dir='right' {sprite_index=spr_links_sword_right_start; depth=-1}
}

if global.poweredup= true
{
if global.dir='up' {sprite_index=spr_links_sword_up_power; depth=1}
if global.dir='down' {sprite_index=spr_links_sword_down_power; depth=-1}
if global.dir='left' {sprite_index=spr_links_sword_left_power; depth=-1}
if global.dir='right' {sprite_index=spr_links_sword_right_power; depth=-1}
}


Well then the thing to know is if global.poweredup is a string or global.dir is a number.

Actually, which line of code is it giving the error for?
« Last Edit: May 02, 2006, 12:04:45 am by Atrius »
Logged

I've done it (sorta)!  Bloom Lighting in GameMaker, and 3D mode too!  Check out the awesome Screen Saver.
  • Kousou Games
Re: Cannot compare arguements....
« Reply #6 on: May 02, 2006, 12:06:30 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 448
line 3, position 16
Logged
Re: Cannot compare arguements....
« Reply #7 on: May 02, 2006, 12:14:26 am »
  • =/
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 2284
You havn't declared the variable have you?
Logged
Re: Cannot compare arguements....
« Reply #8 on: May 02, 2006, 12:24:12 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 448
You mean= global.dir = direction
Logged
Re: Cannot compare arguements....
« Reply #9 on: May 02, 2006, 12:26:16 am »
  • =/
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 2284
Yes, but have you declared all variables.
Logged
Re: Cannot compare arguements....
« Reply #10 on: May 02, 2006, 12:32:41 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 448
all variables?
Logged
Re: Cannot compare arguements....
« Reply #11 on: May 02, 2006, 12:33:24 am »
  • =/
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 2284
global.poweredup is classified as a variable.
Logged
Re: Cannot compare arguements....
« Reply #12 on: May 02, 2006, 12:37:10 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 448
I have: global.poweredup= false, in the create event.
Logged

shadow_caliber

Re: Cannot compare arguements....
« Reply #13 on: May 02, 2006, 01:19:48 am »
Can I see the code where you declare the global.dir?
Logged
Re: Cannot compare arguements....
« Reply #14 on: May 02, 2006, 01:27:33 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 448
image_speed=0.3
global.poweredup= false
var_dir = direction
Logged
Re: Cannot compare arguements....
« Reply #15 on: May 02, 2006, 01:35:30 am »
  • Huzzowee!
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 571
The variable "direction" is a built-ion local variable represented by a number. 0 is pointing right, 90 is up, and so on. You are trying to compare that number to a string. It doesn't work that way. You must either change the checks to look for numbers, or declare the variable as a string in the first place.
Logged
"They say 'Don't sweat the little things!', but in the end, the little things are all that matter..."
--Alex2539

Goodnight

Once and future Captain
Re: Cannot compare arguements....
« Reply #16 on: May 02, 2006, 03:25:40 am »
  • With a Capital G
  • *
  • Reputation: +1/-0
  • Offline Offline
  • Gender: Male
  • Posts: 706
Or just make sure that global.dir is declared in a Create event, or earlier in the game.
Logged
Re: Cannot compare arguements....
« Reply #17 on: May 02, 2006, 11:20:11 am »
  • Fear my Blades
  • *
  • Reputation: +3/-0
  • Offline Offline
  • Gender: Male
  • Posts: 562
image_speed=0.3
global.poweredup= false
var_dir = direction

Wait, is global.dir also set to direction.

If it is then its a number 0-360, not a word left/right/up/down.

0='right'
90='up'
180='left'
270='down'
Logged

I've done it (sorta)!  Bloom Lighting in GameMaker, and 3D mode too!  Check out the awesome Screen Saver.
  • Kousou Games
Re: Cannot compare arguements....
« Reply #18 on: May 02, 2006, 12:04:42 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 6206
If you would make a screenshot from the error...
Logged
Pages: [1]   Go Up

 


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



Page created in 0.048 seconds with 75 queries.

anything