Using Parameters in custom functions

Started by Goot, Fri 09/07/2004 07:04:48

Previous topic - Next topic

Goot

I have defined a custom function in my global script:
function lizard_come(int x,int y){
code here
}

Then I imported it in the script header. I then put this in a room script:

lizard_come(131,140);

When I tried to save the game I got an error message telling me I had the wrong number of parameters for lizard_come. Does anyone have any idea of why this didn't work? Does it have something to do with the fact I used x and y for my integers (The function makes a lizard come at coordinates x,y. That's why I used x and y.)

Gilbert

What did you put in the script header? It should be like:

import function lizard_come(int x,int y);

or just:

import function lizard_come(int, int);

TerranRich

Status: Trying to come up with some ideas...

SMF spam blocked by CleanTalk