Page 1 of 1
[16 Dec 2010] Problem with big file list
Posted: Sat Jun 13, 2020 5:32 pm
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?
[16 Dec 2010] Re: Problem with big file list
Posted: Sat Jun 13, 2020 5:32 pm
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
[16 Dec 2010] Re: Re: Problem with big file list
Posted: Sat Jun 13, 2020 5:32 pm
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
[16 Dec 2010] Re: Problem with big file list
Posted: Sat Jun 13, 2020 5:32 pm
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)
[17 Dec 2010] Re: Re: Problem with big file list
Posted: Sat Jun 13, 2020 5:32 pm
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
[17 Dec 2010] Re: Problem with big file list
Posted: Sat Jun 13, 2020 5:32 pm
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$)