Topic:   Methods   (Read 15227 times)


0 Members and 1 Guest are viewing this topic.

Connors


  • ^ This guy is amazing.

  • ****


  • Posts: 2374

  • It's a secret to everyone...
Methods
« on: January 08, 2011, 02:08:53 PM »
How do you set multiple parameters for a method? I put "x, y" in "parameters" (name of method is createObject) but when I put createObject (100, 100) in the open game method I get a "wrong number of parameters" error.
Warning: The above post may have been modified multiple times.

"In a great game, the character must never perfectly obey the user's command"
 - Tim Rogers

http://connorspuzzles.tumblr.com/

Charlo


  • GMG-er

  • **


  • Posts: 451
Re: Methods
« Reply #1 on: January 08, 2011, 04:10:17 PM »
I think the correct syntax would be:
 
Code: [Select]
createObject 100, 100

*Edit* Hmm, it's not working for me, so I could be wrong.   :-/  I don't make much use of methods with parameters since everything in SC is global.
« Last Edit: January 08, 2011, 04:56:33 PM by Charlo »