mIRC Home    About    Download    Register    News    Help

Print Thread
#103225 18/11/04 12:37 AM
Joined: Dec 2002
Posts: 397
A
ATMA Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Dec 2002
Posts: 397
ok i have some code:

heres my proble... in set boxes... the $+ [ %var ] works fine... but
when i get to $+ [ %a ] in the set boxes part all i get back is the value of %a not the value of %winmenu.x.%a(1 or such number)
i have no idea why the [censored] its doing this any one know? -.- i have goten really rusty lol havnt done this in a while :P
[code]
alias setboxes {
;; @window, x axis, y axis, width, height
inc %webmenu.inc 1
set %webmenu.loc $+ [ %webmenu.inc ] $1
set %webmenu.x $+ [ %webmenu.inc ] $2
set %webmenu.y $+ [ %webmenu.inc ] $3
set %webmenu.w $+ [ %webmenu.inc ] $4
set %webmenu.h $+ [ %webmenu.inc ] $5
drawboxes
}

alias drawboxes {
var %a = 1
while (%a <= %webmenu.inc) {
echo :: drawrect -f @webmenu 0 1 %webmenu.x $+ [ %a ]
inc %a
}
}
{/code]

Joined: Jan 2003
Posts: 1,057
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2003
Posts: 1,057
try: [ $+(%,webmenu.x,%a) ]

Joined: Feb 2004
Posts: 2,013
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Feb 2004
Posts: 2,013
You don't need the evaluation brackets when setting a variable.

So set %webmenu.x $+ [ %webmenu.inc ] $2 becomes set %webmenu.x $+ %webmenu.inc $2

Regarding the retrieval of the webmenu variable, try it like this: %webmenu.x [ $+ [ %a ] ]

Greets

Joined: Jan 2003
Posts: 2,125
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,125
You don't need any brackets in the /set commands, you might as well remove them.

But you need an extra pair of brackets in /drawrect:
echo :: drawrect -f @webmenu 0 1 %webmenu.x [ $+ [ %a ] ]

Joined: Dec 2002
Posts: 397
A
ATMA Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Dec 2002
Posts: 397
ah thank you for helping X.x i really apreciate it


Link Copied to Clipboard