Pakmaker Help

Blitz3D Forums/Blitz3D Programming/Pakmaker Help

System4 Studios(Posted 2009) [#1]
K... so I use the follow command..

p\mesh[2] = LoadMesh(pak("meshes/mp5.3DS",camera))


However when I try to compile/debug.. it claims it has too many parameters.. and I know that it has to with "camera" however I need that mesh to be the camera's child.

Any help?


LineOf7s(Posted 2009) [#2]
So close.

Try
p\mesh[2] = LoadMesh(pak("meshes/mp5.3DS"),camera)

Assuming your Pakmaker code is correct (I didn't look), you had the bracket in the wrong spot.


System4 Studios(Posted 2009) [#3]
Thank you very much sir!! It works.. :D

So it has to be outside the brackets.. Okay..


LineOf7s(Posted 2009) [#4]
LoadMesh has two possible parameters- filename$ and parent (parent being optional) - and is called with
LoadMesh ( filename$, parent )

In your case, the "filename" was pak("meshes/mp5.3DS"), so you need to remember to keep the LoadMesh format right by keeping the parentheses/brackets in the right places.

What you were doing was making your "filename" be pak("meshes/mp5.3DS",camera) which was fine as far as LoadMesh was concerned, but confusing for the pak() function which was only expecting one parameter, but actually got two. :o)

Hence the error about "too many parameters".