Product Chat / Getting error 501 with sprites

Author
Message
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 13th Feb 2016 15:53
Hey guys

I'm getting error 501 (RUNTIMEERROR_IMAGEILLEGALNUMBER), the scene is as follow:

I'm testing some idea i've about add some pic when player run into winzone.

For load image I'm using sprite system, instead of "ShowImage" statement.
I'm using lee code, just changing image and path.
Lee's code works, I've tried it before, in fact there is some vid in another thread.

I've attached script to an winzone market.
The image load, and prompt too. But suddenly it crash and GG thrown a error message 501.

This piece of code is part of script I'm working on. I've cut the code for isolate and find the culprit, but not to aval.



Thanks for feedback and watch the video.

3com


Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 13th Feb 2016 16:40
its normally because the path is wrong, make sure you have the \\ in the right place.
life\'s one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, AMD R9 200 series , directx 11
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 13th Feb 2016 16:46
So, why it upload img (diamond) in the video?

Tha's the script:



3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 13th Feb 2016 17:08 Edited at: 13th Feb 2016 17:09
Quote: "error 501 (RUNTIMEERROR_IMAGEILLEGALNUMBER), the scene is as follow:"


at first glance, script looks ok, but the error is saying the number of the image that it's trying to assign it to is illegal, meaning whatever the contents of the variable is either not a valid number or blank.
Try debugging the values that are being returned by the g_imgBackdrop and g_sprBackdrop variables, should both be numeric.
Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, SQL, PL-SQL, JavaScript, HTML, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; LG TFT monitor (widescreen). Wanting a new PC at some point.
Interests: Drumming, Saxophone, Art, Theatre, Music.
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 13th Feb 2016 17:26
Quote: "Try debugging the values that are being returned by the g_imgBackdrop and g_sprBackdrop variables, should both be numeric."


Both are numeric values.

The image are transparent background, does this make the difference?

Thanks guys for help me.

3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM
cybernescence
GameGuru Master
11
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 13th Feb 2016 17:57 Edited at: 13th Feb 2016 18:04
Try this version (edit - with your image file path of course - oops):

3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 13th Feb 2016 19:57
cybernescence, mate you are great!, now it works, diamond appears and dissapears wueh hit "E" key as expected.
Thanks a lot dude.

Now the complete idea is run a gif file I had made.
Firts I made diamond model (Max)>animated it>make a video>make gif file from video.
Now I've all the 60 PNG images stored in right folder, and named such as "000.png/059.png", all they are the animation frames, and transparent background.

Unfortunatelly GG load the prompt but not the images, even the firts one either, just the prompt, and does not crash.

The script:



Note: "img" variable are returning numeric values when testing, so teorically "MyImage" array are getting all the paths, anyway I was expecting string values (the image paths), instead of numeric values, even besides I'm using "tostring".
Ignore if this make the difference?

Thanks again guys, for the feedback.

3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM
cybernescence
GameGuru Master
11
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 13th Feb 2016 21:09
Probably best to us the 'old' image commands if you've got png's from 000.png to 059.png:

3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 14th Feb 2016 02:31
Cool cybernescence! it does the job.
Thanks you very much.

I was thinking about it, in fact that was my firts thought, anyway I thought to try sprite system, as most avance system; perhaps in the future.

Post below some level I'm working on, in a video.
Well, the bad new is than the diamond is in the very end of the video, and the worst is that the FPS will happily falling down.
I did not put any bad guy yet, so you imagine if I put them.
Though perhaps worthwhile.



Thanks guys for help, and for watch the video.

3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM

Login to post a reply

Server time is: 2024-11-25 05:54:25
Your offset time is: 2024-11-25 05:54:25