2 registered members (Ayumi, AndrewAMD),
833
guests, and 1
spider. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Zorro 1.41
[Re: Sphin]
#457075
12/23/15 10:27
12/23/15 10:27
|
Joined: Jul 2000
Posts: 27,986 Frankfurt
jcl
OP
Chief Engineer
|
OP
Chief Engineer
Joined: Jul 2000
Posts: 27,986
Frankfurt
|
A function definition does not allow numbers in the parameter list, you must have correct variable names between the parentheses. Example:
function click(int row,int col)
{
sound("click.wav");
string Text = panelGet(row,col);
if(Text == "Buy") // toggle button between "Buy" and "Sell"
panelSet(row,col,"Sell",0,0,0);
else if(Text == "Sell")
panelSet(row,col,"Buy",0,0,0);
else if(Text == "Close All") // push button
sellAllTrades();
else if(Text == "Cancel") // back to last saved state
panelLoad("Log\\panel.csv");
}
|
|
|
Re: Zorro 1.41
[Re: jcl]
#457082
12/23/15 16:55
12/23/15 16:55
|
Joined: Dec 2013
Posts: 568 Fuerth, DE
Sphin
User
|
User
Joined: Dec 2013
Posts: 568
Fuerth, DE
|
Thanks. In other words my trial must be written as:
function click(int row,int col) {
if(row == 5 && col == 0) // the button's coordinates
...
}
At least this way it works.
|
|
|
|