Setting background image

Posted by Turncoat on Sat 30 Jul 2011 03:28 AM — 3 posts, 15,849 views.

#0
Using the function SetForegroundImage(), I tried doing the following in the instant run command box:


SetBackgroundImage ("greybg.jpg", 13)


This did not work, so I searched a bit and found a previous forum post regarding it, so I tried...


check (SetBackgroundImage (GetInfo (66) .. "greybg.jpg", 13))


It gave the following error:


Error number: 0
Event:        Run-time error
Description:  [string "Immediate"]:1: General problem with a parameter to a script call

stack traceback:

	[C]: in function 'error'

	[string "Check function"]:1: in function 'check'

	[string "Immediate"]:1: in main chunk
Called by:    Immediate execution


I figure this may be a problem with me trying to run it in the immediate window (ctrl+i). If that is the case, where/how should I add/run it?

Thanks for any assistance regarding this!
Amended on Sat 30 Jul 2011 03:29 AM by Turncoat
#1
Checking the return call page(http://mushclient.com/scripts/function.php?action=errors), your error seems to be eBadParameter, which with that function, is returned for a bad filetype or a filepath with less than five characters. The documentation on said function(http://mushclient.com/scripts/function.php?name=SetBackgroundImage) states that the supported filetypes are .BMP and .PNG. You can try using some sort of image software (MS Paint is always good) to convert your image to one of those formats.
#2
I feel so stupid for it to be something that simple. Ircria, thank you very very very much, it was the file type that needed fixed (converted it with mspaint), and now it is perfectly fine. Thank you again!