my blend file don't work like an exe

hi all

will you can try this example?
http://nmedia.avu.cz/~mucska/blender/intelligent_engine.zip

When the “AI”(one which draw blue way) in blender 2.25 collide with wall and rut, it turn your self in accordance to piece of knowledge.

when I made an exe from this file, AI don’t work correctly. when AI collide with wall it stop yourself and that’s all, no turning nothing.

do you know why?

thx jm

did you use python or logic bricks to program piece of knowedge?

for python to work in exec. you need to make dynamic runtime and have proper pthon libs. nearby for it to find.

yes I made some pice of this “game” with python.

I save dynamic.exe into the folder and gave fmod.dll near by(to the same folder).
how can I identify right dll that I schould use?

jm

I can’t really see what is going on well enough to see something that happens incorrectly

as for the error, check your python files for errors that would be caused if modules suddenly are missing

the math module shouldn’t be a problem, but string may be

hell that could very well be it

use the -c switch on your runtimes
(or sign your file and do blenderplayer -c yourfile.blend)
to get the console output

namely:

C:\Documents and Settings\oal01\My Documents>e:\blender-publisher-2.25-windows\b
lenderdynplayer -c -w -noaudio -p 128 256 640 480 intelligent_engine.blend
PYTHON SCRIPT ERROR:
Traceback (most recent call last):
  File "memo_ai", line 1, in ?
ImportError: No module named string
PYTHON SCRIPT ERROR:
Traceback (most recent call last):
  File "memo_ai", line 1, in ?
ImportError: No module named string
-y
PYTHON SCRIPT ERROR:
Traceback (most recent call last):
  File "memo_ai", line 1, in ?
ImportError: No module named string
WAIT
-y
PYTHON SCRIPT ERROR:
Traceback (most recent call last):
  File "memo_ai", line 1, in ?
ImportError: No module named string
PYTHON SCRIPT ERROR:
Traceback (most recent call last):
  File "memo_ai", line 1, in ?
ImportError: No module named string
WAIT
WAIT
-y
PYTHON SCRIPT ERROR:
Traceback (most recent call last):
  File "memo_ai", line 1, in ?
ImportError: No module named string
WAIT
-y
WAIT
-y
-y
-y
-y
-y
-y
-y
-y
-y
-y

What i’ll have do?

the string is normal python modul. so what is the problem?
why Blender don’t show this error?

use the -c switch on your runtimes
(or sign your file and do blenderplayer -c yourfile.blend)
…this is wery usefull. thanks

jm

Blender doesn’t come with all of python

if I had to guess, it would come with only really the sys and math modules in addition to the builtin functions and Blender’s modules

but it may not even come with sys

solution: don’t use what isn’t there

To find out what modules are built in:

import sys
print sys.builtin_module_names

For this to work in an exe, you’ll have to start it with the -c command line option, as z3r0 d described.

thx

I think there must be a way how can I add non implemented moduls to the exe file.
for example, you know my thread about multiuser script. this script work like an dynamic exe, but you schould append fmod.dll to the same folder.
this examle(multiuser) use modul socket which isn’t builtin modul in blender.

how can I recognize which dll schould I append when I use nonimplemented modul?

jm

hi

Problem was:

  1. space between “Program Files”
  2. the blend file schould be sign, lock and compress
  3. the script schouldn’t have any print(if it have - the sript end on line with print because haven’t console where it can post out-put)
  4. ofcourse, I schould insert into the same folder python20.dll, fmod.dll, string.py

thanks all jm

Happens often to me, mostly it is because the script has some "print"s in in which will cause an error on a Runtime (which defaults not to keep the console window open). So you have two possibilities:

  1. Remove all prints
  2. start the Exe with -c to keep the console open.

Carsten.

look at semifinal post:)

…but Thank You jm

Doh!

%|

I should read threads completely…

Carsten