233 posts
Location
Cleveland, Ohio
Posted 11 March 2013 - 02:32 PM
i am making (yes, ANOTHER) an os and i am COMPLETELY stuck on the desktop.
i painted a pic in paint. named it .desktop
then did this.
desk = paintutils.loadImage(".desktop")
paintutils.drawImage(desk,1,1)
i get error;
paintutils:92:attempt to get length of nil
i uninstalled and reinstalled cc
halp?
1214 posts
Location
The Sammich Kingdom
Posted 11 March 2013 - 02:33 PM
Did you check that .desktop is in the same directory that the script you are running is? You should also use exact paths.
233 posts
Location
Cleveland, Ohio
Posted 11 March 2013 - 02:35 PM
it is;
whats an exact path?
1214 posts
Location
The Sammich Kingdom
Posted 11 March 2013 - 02:37 PM
For instance: "/.desktop" instead of ".desktop". This insures it accesses the file from that directory instead of the directory it was ran from.
233 posts
Location
Cleveland, Ohio
Posted 11 March 2013 - 02:38 PM
still same error
1214 posts
Location
The Sammich Kingdom
Posted 11 March 2013 - 02:44 PM
Just looked at the API. It is trying to get the length of a table that does not exist meaning that it could not save the image to the file.
Mind giving the contents of ".desktop"?
233 posts
Location
Cleveland, Ohio
Posted 11 March 2013 - 02:45 PM
ok
233 posts
Location
Cleveland, Ohio
Posted 11 March 2013 - 02:47 PM
233 posts
Location
Cleveland, Ohio
Posted 11 March 2013 - 02:49 PM
i tried it in a diff. program,
no cigar
233 posts
Location
Cleveland, Ohio
Posted 11 March 2013 - 02:57 PM
abandonment :(/>
2088 posts
Location
South Africa
Posted 11 March 2013 - 05:45 PM
Where EXACTLY did you put the .desktop file?
1619 posts
Posted 11 March 2013 - 06:09 PM
You definitely have the two files in different directories.
233 posts
Location
Cleveland, Ohio
Posted 12 March 2013 - 11:24 AM
its in cd/disk
and the drawing file is in cd/disk
233 posts
Location
Cleveland, Ohio
Posted 12 March 2013 - 11:32 AM
i really need this :(/>
233 posts
Location
Cleveland, Ohio
Posted 12 March 2013 - 11:41 AM
i got it
i used npaintpro instead of paint
233 posts
Location
Cleveland, Ohio
Posted 12 March 2013 - 11:56 AM
and cant use cd disk
1511 posts
Location
Pennsylvania
Posted 12 March 2013 - 02:07 PM
its in cd/disk
and the drawing file is in cd/disk
i really need this :(/>
i got it
i used npaintpro instead of paint
and cant use cd disk
Instead of creating a new post every 5 minutes, why don't you use that handy 'Edit' button near the bottom of your post. <_</>
2088 posts
Location
South Africa
Posted 12 March 2013 - 05:39 PM
If it's in DISK then you need
desk = paintutils.loadImage(".desktop")
to be
desk = paintutils.loadImage("disk/.desktop")