[16 Dec 2010] Problem with big file list

Contains all messages from the Hollywood mailing list between 01/2006 and 08/2012
Locked
xabierpayet
Posts: 267
Joined: Fri Feb 24, 2012 9:34 am

[16 Dec 2010] Problem with big file list

Post by xabierpayet »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Thu, 16 Dec 2010 11:32:43 +0000 (GMT)

Hello, first wish to you merry christmas, second, i have a problem with hollywood, i´m doing a program with 7000 images preloaded, i need access to them via example, is the best form that i find, but doing all as you seen in the example this dont work, i think that the problem is adding the string "a" to brushval but i dont know other way to do it, can you helpme? thanks alot

Code: Select all

@brush 23446,"impresores/z845.jpg"

az845=23446

impresora$="z845"

brushval$=impresora$
brushval$=addstr("a",brushval$)
brushv=val(brushval$)
debugprint(brushv)

debugprint(az845)

displaybrush(brushv,1,1)
 <-----displaying this brush i have the error, if i call az845 i can 
open brush 23446 but calling brushv i have an error, any idea?
Severin
Posts: 18
Joined: Wed Oct 25, 2017 8:17 pm

[16 Dec 2010] Re: Problem with big file list

Post by Severin »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Thu, 16 Dec 2010 16:28:41 +0000

Hello xabier
Hello, first wish to you merry christmas, second, i have a problem with hollywood, i?m doing a program with 7000 images preloaded, i need access to them via example, is the best form that i find, but doing all as you seen in the example this dont work, i think that the problem is adding the string "a" to brushval but i dont know other way to do it, can you helpme? thanks alot
Try brushval$ = "a" .. impresora$ instead of the next two lines
brushval$=impresora$ brushval$=addstr("a",brushval$)
brushv is going to be 845 as the az will be ignored
open brush 23446 but calling brushv i have an error, any idea?
brushv is going to be 845 as the az will be ignored by the val command, you cannot convert "az" into a number.

It looks like you're also mixing up strings and variable names by using az845 as both a string and a variable
xabierpayet
Posts: 267
Joined: Fri Feb 24, 2012 9:34 am

[16 Dec 2010] Re: Re: Problem with big file list

Post by xabierpayet »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Thu, 16 Dec 2010 20:49:26 +0000 (GMT)

well, i try this and i still with the same problem, but i dont understand this, if i calll debugprint(az845) this return 23446 it´s perfect i need this numbertocall my brush, but if i call debugprint(brushval$) i still with az845 result this is not valid for me i need the number, and other curiosity if i dont add the "a" character, but it´s needed in my script i can call displaybrush(z845) with no problem this work fine, i dont know if it´s well explained but this is the problem. regards
Severin
Posts: 18
Joined: Wed Oct 25, 2017 8:17 pm

[16 Dec 2010] Re: Problem with big file list

Post by Severin »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Thu, 16 Dec 2010 21:51:47 +0000

Try this... I've not tested it, just an idea...

Code: Select all

 @brush 23446,"impresores/z845.jpg"
 az845=23446
 impresora$="z845"
;find the number in the string
 brushv, length = val (impresora$)  
;remove the number and add the 'a'
 prefix = "a" .. Replace$ (impresora$, StrStr(brushv), "")
;or if the number is always the last thing use this but don't use both.
 prefix = "a" .. UnRightStr (impresora$, length)  
 debugprint(brushv)
 debugprint(az845)
 displaybrush(prefix..brushv,1,1)
xabierpayet
Posts: 267
Joined: Fri Feb 24, 2012 9:34 am

[17 Dec 2010] Re: Re: Problem with big file list

Post by xabierpayet »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Fri, 17 Dec 2010 00:06:06 +0000 (GMT)

this solution dont work here, brushv,length returns 0,0 maybe i need do a giant if list, something as :this 7000 times xD

Code: Select all

if(impresora$="az845")
   valor=23446
endif
i´m inside a function and i cannot gosub here this will be weird
Severin
Posts: 18
Joined: Wed Oct 25, 2017 8:17 pm

[17 Dec 2010] Re: Problem with big file list

Post by Severin »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Fri, 17 Dec 2010 12:13:21 +0000

brushv.length would return 0 because it's TWO variables, brushv & length. read your hollywood manual for the val command.

The correct line is: brushv<comma><space>length<space>=<space>val<space>(impresora$) and not: brushv<dot>length<space>=<space>val<space>(impresora$)
Locked