xcool3000 Posted February 24, 2014 Share Posted February 24, 2014 hello people, im having a problem, i have the following code: procedure LoadBMP; begin attackbutton := BitmapFromString(10, 8, 'beNoB8AAP/w0W+qWD/' + '6Fm/8iIqJxvABICAAYKIQADNDxjMTxiV2SK7oZe6Jdl+cOSvKCBDQ' + 'YABwAHEwAQLDtTITNKNUhh+Itd2Zps06+IxZ+FJAAAFgAGCwAZCyA' + 'uGTA9J0BRKkZECQAUOhs6tq+6FSMVDAAAMQAABBQaHSoxHys0AAUF' + 'BwAOGgAWNh8up5yWKA0AJAAAAAcOChYdDxsiQCwuxqu3GQAJDwABw' + '7WwblBJJQAAAAMJAAYPCRAZRyAe3J2pIQAABQQAipuMnIqDkk5WAw' + 'UNAAAIAAEIXysm85WgMgAAAwMAACAIYlJNyHSHW1dgNTE6D6mCPjc' + '='); end; I am not shore if that is just a color or if it is a color at all, but if it is: i want to change the colour in it (to 2907022) , i tried with info from the scar divi wiki and it showed up unknown identifier bitmapfromstring, if you could help me i would be greatfull Quote Link to comment Share on other sites More sharing options...
slacky Posted February 25, 2014 Share Posted February 25, 2014 (edited) A bitmap is not A color, it's like a list (array) of colors.. It has pixels, each holding one color. Your bitmap has 80 pixels (10*8), that's 80 colors. And that's not a SCAR 3.4 bitmap, it's from a much older version of SCAR. So I doubt anyone here will help you. In current version of scar (3.4) you can use any of if you want to change one and one pixel: BMP.Pixel[x,y] := 2907022; Or sett the whole bitmap (every pixel) to be 2907022 BMP.Clear(2907022) To replace every color that is equal to 0 (black) you could do something along the lines of: var x, y, repColor, color: Integer; BMP:TSCARBitmap; begin BMP := TSCARBitmap.Create(''); BMP.SetSize(50,50); DebugBitmap(BMP); Wait(500); repColor := 0; Color := 2907022 for y:=0 to bmp.Height-1 do for x:=0 to bmp.Width-1 do if BMP.Pixel[x,y] = repColor then BMP.Pixel[x,y] := Color; DebugBitmap(BMP); end. Edited February 27, 2014 by slacky Quote Link to comment Share on other sites More sharing options...
xcool3000 Posted February 25, 2014 Author Share Posted February 25, 2014 I see, so it was set to find a specific array of colours and not just one right? I tried to replace every color as you said, and the script worked but didn't recognize what i wanted, maybe because the rest of it its configuired to an image and not a color, nevermind, found similar exe bot, tank you Quote Link to comment Share on other sites More sharing options...