Important information: this site is currently scheduled to go offline indefinitely by end of the year.

[MAXSCRIPT] "Vertex index in face out of range: [0,1,2]"

Post questions about game models here, or help out others!
Post Reply
Valerian
beginner
Posts: 20
Joined: Tue Jul 19, 2011 11:25 pm
Location: Germany
Has thanked: 1 time
Contact:

[MAXSCRIPT] "Vertex index in face out of range: [0,1,2]"

Post by Valerian »

Im trying to append some shorts into a vertex array i may show you my code:

Code: Select all

for i = 1 to 40 do(

f1=readshort f
f2=readshort f
f3=readshort f
append Faces_array[f1,f2,f3]
)
Am i doing something wrong? If you need more information to help me, just write it in here :) sorry to bother you
chrrox
Moderator
Posts: 2602
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1422 times

Re: [MAXSCRIPT] "Vertex index in face out of range: [0,1,2]"

Post by chrrox »

Just add +1 to all of them.
Valerian
beginner
Posts: 20
Joined: Tue Jul 19, 2011 11:25 pm
Location: Germany
Has thanked: 1 time
Contact:

Re: [MAXSCRIPT] "Vertex index in face out of range: [0,1,2]"

Post by Valerian »

LOL.
It works! :D
but is there any explanation to this?
chrrox
Moderator
Posts: 2602
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1422 times

Re: [MAXSCRIPT] "Vertex index in face out of range: [0,1,2]"

Post by chrrox »

max is a 1 based system most game engines are 0 based.
Post Reply