Numbered Steps to Reproduce Problem:
Create a new project with the code from the code snippet.
Code Snippet (if applicable) to Reproduce Problem:
/*
These are simple defaults for your project.
*/
world
fps = 25 // 25 frames per second
icon_size = 96 // 32x32 icon size by default
view = 6 // show up to 6 tiles outward from center (13x13 view)
// Make objects move 8 pixels per tick when walking
mob
// step_size = 8
Logout()
..()
del src
verb
Transform()
var/icon/a=input("Choose an icon from your system","Your Icon")as null|icon
if(!a)
world<<"For some reason we didn't see that you picked an icon file...weird I know..."
return
a=new(a)
if((input("Do you want to resize this icon to 96*96?","Resize Icon") as null|anything in list("Yes","No"))=="Yes")
a.Scale(96,96)
src.icon=a
var/sj=input("Type an icon state from that file.","Your Icon State")as null|text
if(sj)
src.icon_state=sj
//obj
// step_size = 8
Expected Results:
It would set your icon to any icon you want.
Actual Results:
90% of the time it fails, but it only happens on specific icons...
Does the problem occur:
Every time? Or how often?Every Time
In other games?Yes
In other user accounts?Yes
On other computers?Yes
When does the problem NOT occur?
Not sure
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
I didn't download every version, but it's interesting to note it has been broken for a very long time....
It worked in 465 & broken again by 468...so it was somewhere around there...and i'm using 497, so that was quite a while ago...
It's interesting to note theres no problem if I create in 465 & run the project using 497, at that point everything works as expected, but if I compile with 497 it fails, as well as compiling with 468 makes it fail.
Even if I do clean compile with 497 & include new features it doesn't seem to fail as long as I had 465 to originally compile it once...
I don't have a specific version, I just know it's around 465-468, 465 works, 468 fails, I don't know about in-between.
It was interesting to note it said it was compiled for 468 or later though when I first tried to run it with 465, but i'm not using any features exclusive to 468 & compiling pre-468 it actually WORKS as expected.
Workarounds:
Compile any new projects using an early byond version, in my case byond versions below 468 seem to do the trick...
---As for icons to test with I was simply trying to set a placeholder icon from RoH.
http://www.byond.com/developer/hub/Xerse/RiseofHeroesSource
That's the link, it seems enemies.dmi will work, I click the icon, no error message about me "not having selected an icon" BUT when I select uniques.dmi it does give me the message.
It seems to be only certain icon files that produce a problem, and it's most of them...
I have a mix of icons that are 3.5 & 4.0 icons still, so i'm not sure if any of that plays a role or not & i'm pretty sure that I didn't upgrade any of the source icons to 4.0 from the RoH source, so it doesn't explain why some work & others don't.
However it seems that enemies.dmi is a large icon(many states) and all the others ive been trying are comparatively small & always fail, maybe it has to do with size of the icon, amount of states in the icon, or something like that...
------Hopefully it can be fixed, it's pretty annoying...I couldn't figure out why it wouldn't work, since the code looked solid & worked on other games I've been working on, but never worked in my new project.