Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Studio Chat / [SOLVED] shader pack deleting light error

Author
Message
shadey
14
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 3rd Jun 2020 21:19 Edited at: 3rd Jun 2020 22:22
When i create a few lights with SP_Light_AddPointLight(X#,Y#,Z#,Size#,Red,Green,Blue) int SP_Light.length, then i go to delete with:

SP_Light_Remove(LightID)

agk errors out with an error saying:
Array index out of bounds,index: 4, Array Length: 2 in ./../Templates/ShaderPack/Includes/SP_Lighting.agc at line 94.
Always on the last light getting deleted,no matter which order they get deleted

So when I look there I remmed out the line:
SP_Light.remove(LightID)

which fixed the above error but of course caused errors further down the line!
If need be I can code a seperate example of this but well one would need the shaders pack!

for what it is worth I am running App Game Kit Studio through Steam on Linux Mint!
Hail to the king, baby!

The author of this post has marked a post as an answer.

Go to answer

janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 4th Jun 2020 16:43
Hey, I'm sorry, I thought I already sorted this problem, seems not...
You have a PM with a link to the corrected PS_Lighting.agc file.

If anybody else has this problem feel free to write me.
hendron
8
Years of Service
User Offline
Joined: 20th Dec 2015
Location:
Posted: 4th Jun 2020 16:44 Edited at: 4th Jun 2020 16:50
[edit] nevermind, didn't see janbo's reply before I posted.
shadey
14
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 4th Jun 2020 18:30 Edited at: 4th Jun 2020 18:31
the link asks for some request code
Hail to the king, baby!
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 5th Jun 2020 14:36
you got an answer
shadey
14
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 5th Jun 2020 15:24 Edited at: 5th Jun 2020 16:02
This post has been marked by the post author as the answer.

Okay!
tnx for the fix man,was pulling the small amount of hair I had out,what with sorting my own code out!
Hail to the king, baby!

Login to post a reply

Server time is: 2024-03-28 17:21:21
Your offset time is: 2024-03-28 17:21:21