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]


Need amazing web design for low price: http://www.matrixn3t.net
Joined: Jan 2003
Posts: 1,063
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2003
Posts: 1,063
try: [ $+(%,webmenu.x,%a) ]


If it ain't broken, don't fix it!
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
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


Gone.
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
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 ] ]


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
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


Need amazing web design for low price: http://www.matrixn3t.net

Link Copied to Clipboard