Crystal Space
Welcome,
Guest
. Please
login
or
register
.
May 22, 2013, 01:10:49 am
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
9224
Posts in
2230
Topics by
5384
Members
Latest Member:
Mgtahsit
Crystal Space
Associate Projects
CEL Discussion
Error: appinit is not callable
« previous
next »
Pages:
[
1
]
Author
Topic: Error: appinit is not callable (Read 4480 times)
Vortex
Newbie
Posts: 7
Error: appinit is not callable
«
on:
August 06, 2007, 01:43:20 am »
Hi,
I'm using CelStart V7 for Windows.
When I start my CelStart program I get the following error in the console:
Error: appinit is not callable
This dialog box appears:
crystalspace.application.celstart: Can't create behaviour 'appinit' for entity 'bootstrap'.
It looks like it finds appinit.py, but it can't start my init method. Does anybody know what's wrong ?
This is my celstart.cfg file:
;CelStart.ClearScreen = true
Reporter.Silent = true
CelStart.MinimumVersion = 4
;CelStart.MapFile.a = SnowboardGame.xml
CelStart.Name = SnowboardGame
CelStart.Description = Snowboard Game
CelStart.Icon = SnowboardGame.jpg
Video.ScreenWidth = 800
Video.ScreenHeight = 600
System.Plugins.iGraphics3D = crystalspace.graphics3d.opengl
System.Plugins.iEngine = crystalspace.engine.3d
System.Plugins.iFontServer = crystalspace.font.server.multiplexer
System.Plugins.iFontServer.1 = crystalspace.font.server.default
System.Plugins.iFontServer.2 = crystalspace.font.server.freetype2
System.Plugins.iImageIO = crystalspace.graphic.image.io.multiplexer
System.Plugins.iLoader = crystalspace.level.loader
System.Plugins.iReporter = crystalspace.utilities.reporter
System.Plugins.iStandardReporterListener = crystalspace.utilities.stdrep
System.Plugins.iCollideSystem = crystalspace.collisiondetection.opcode
System.Plugins.iSndSysLoader = crystalspace.sndsys.element.loader
System.Plugins.iSndSysRenderer = crystalspace.sndsys.renderer.software
System.Plugins.iCelPlLayer = cel.physicallayer
System.Plugins.iCelPersistence = cel.persistence.classic
System.Plugins.iCelConsole = cel.celconsole
CelStart.BehaviourLayer.blpython = cel.behaviourlayer.python
CelStart.Entity.bootstrap = bootstrap
CelStart.EntityBehaviour.bootstrap = appinit
CelStart.EntityBehaviourLayer.bootstrap = blpython
This is my appinit.py file:
from pycel import *
def __init__(self,celEntity):
zoneMgr = celZoneManager(celEntity)
Vfs.ChDirAuto("/tmp/celstart/")
zoneMgr.Load("/tmp/celstart","level.xml")
Thanks in advace,
Jeroen
Logged
Vortex
Newbie
Posts: 7
Re: Error: appinit is not callable
«
Reply #1 on:
August 13, 2007, 09:38:33 pm »
I've got this fixed.
I've downloaded the odetest example from the Crystal Space website, but it says:
- No factory for pccommandinput registered
Where should I look to get this fixed ? Are these examples still compatible with the latest CelStart ?
It would be nice if there are some Python examples at the CelStart page.
Thanks in advance.
«
Last Edit: August 13, 2007, 09:43:51 pm by Vortex
»
Logged
Leetonicon
Newbie
Posts: 15
Re: Error: appinit is not callable
«
Reply #2 on:
August 24, 2007, 04:22:25 am »
I agree it would be nice to have some python celzip's; I'm working on a simple app using python and celstart but I don't know if I'm doing this right (for example, I still haven't figured out how to get hover to work; if I try to create a new CraftController, the program immediately quits. I am, however, making some progress and so can hopefully try to post something at some point so other people more experienced can tell me how to improve it and less can build off it, unless someone posts something better first.
Anyways, I suggest you add a line that appends pccommandinput to the PcFactories list
PcFactories.append("cel.pcfactory.pccommandinput")
(I have an initialization routine that does the following:
def SetupFactories(self):
pcclasses = ["region","tooltip","mesh","solid","meshselect","zonemanager","trigger", "quest","light","inventory","defaultcamera","gravity","movable", "pccommandinput","linmove","actormove","colldet","timer","soundlistener", "soundsource","billboard","properties" ,"craft","hover","mechsys","mechobject"]
for pcclass in pcclasses:
PcFactories.append("cel.pcfactory."+pcclass)
print "Added ",pcclass
I presumably adapted it from somewhere as I'm not using quest or light in my code at present, at least as far as I know)
Logged
Vortex
Newbie
Posts: 7
Re: Error: appinit is not callable
«
Reply #3 on:
August 27, 2007, 07:53:51 pm »
I haven't done something with CelStart anymore, because I don't know how I should go further. I'm still interested however.
I'm going to give your code a shot.
I think a lot of people are going to like it if you can add a simple CelStart/Python example at the CelStart webpage.
Logged
Leetonicon
Newbie
Posts: 15
Re: Error: appinit is not callable
«
Reply #4 on:
August 30, 2007, 04:09:36 am »
I just posted my code to
http://carletronicon.googlepages.com/mycelstartexample
(click image to download).
Jorrit et al: is it permitted for me to just modify the celstart wiki page to add my example file / image or is there some procedure I'm missing to get approval?
Logged
Vortex
Newbie
Posts: 7
Re: Error: appinit is not callable
«
Reply #5 on:
September 02, 2007, 08:35:48 pm »
I only had time to have a quick look at your code. It looks well structured and clean. I hadn't time to actually run it.
Maybe you should email Jorrit directly if you can add this to the CelStart wiki. His email address is somewhere at the contact page.
Logged
genjix
Jr. Member
Posts: 53
Re: Error: appinit is not callable
«
Reply #6 on:
October 07, 2007, 04:03:16 pm »
from pycel import *
class appinit:
def __init__(self,celEntity):
zoneMgr = celZoneManager(celEntity)
Vfs.ChDirAuto("/tmp/celstart/")
zoneMgr.Load("/tmp/celstart","level.xml")
It looks for an object that you specified (appinit) in a file of the same name (appinit.py) and tries to create it.
Logged
Pages:
[
1
]
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Crystal Space Development
-----------------------------
=> General Crystal Space Discussion
=> Support
-----------------------------
Crystal Space Project Development
-----------------------------
=> Feature Requests
=> Plugins
=> Bug Reports
-----------------------------
Crystal Space Development
-----------------------------
=> Game Content Creation
-----------------------------
Miscellaneous
-----------------------------
=> Article/Tutorial Requests
=> Article/Tutorial Discussion
-----------------------------
Crystal Space Project Development
-----------------------------
=> Development Discussion
-----------------------------
Crystal Space Projects
-----------------------------
=> Project Discussion
=> WIP Projects
=> Finished Projects
-----------------------------
Associate Projects
-----------------------------
=> CEL Discussion
=> Crystal Core Discussion
=> CrystalBlend Discussion
-----------------------------
Crystal Space Project Development
-----------------------------
=> Google Summer of Code
-----------------------------
Associate Projects
-----------------------------
=> Apricot (Open Game)
=> Ares Project
Loading...