noob needs help and a slap up side the head for being dumb

heres the code

import direct.directbase.DirectStart
from direct.task import Task
from direct.actor import Actor
import math
#Load the first environment model
world = loader.loadModel("c:\game\data\tetris-building.egg")
world.reparentTo(render)

world.setScale(0.25,0.25,0.25)
world.setPos(-8,42,0)


#Run the tutorial
run()

this is what it returns when i run it

DirectStart: Starting the game.
Warning: DirectNotify: category 'Interval' already exists
Known pipe types:
  wglGraphicsPipe
(all display modules loaded.)
:util(warning): Adjusting global clock's real time by 5.8119e-006 seconds.
:loader(error): Couldn't load file c:\game\data etris-building.egg: not found on
 model path (currently: "/c/game;/c/Panda3D-1.5.4/etc/..;/c/Panda3D-1.5.4/etc/..
/models")
Traceback (most recent call last):
  File "c:\game\game.py", line 7, in <module>
    world.reparentTo(render)
AttributeError: 'NoneType' object has no attribute 'reparentTo'

help the noob plz :slight_smile:

its not your fault. thanks to microsoft (jeah they love to make things different from other system just to break compatibility)… well they use “” for seperating folders in path. on all other systems its “/” . the thing is. in strings “” is a special character. you write a newline as “\n” or in your case a “\t” would be an indentation. if you want a “” you need to write “\”

so your path would be “c:\game\data\tetris-building.egg”
its more recommended to use the “standard” path-names anyway.
which would be seomthing like /c/game/data/tetris-building.egg <-no garantuee on correctness i never used windows-path naming like that.

in many cases it also makes sense to use relative path names.

greetings, thomas

hmm ok i tryed that it gives me the same thing heres my code

import direct.directbase.DirectStart
from direct.task import Task
from direct.actor import Actor
import math
#Load the first environment model
worlds = loader.loadModel("c:\\game\\data\\street-scene.egg")
worlds.reparentTo(render)
worlds.setScale(0.25,0.25,0.25)
worlds.setPos(-8,42,0)


#Run the tutorial
run()

lets make two post and piss off the admin * sorry for two post in a row *
some what but now it gives me this error

DirectStart: Starting the game.
Warning: DirectNotify: category 'Interval' already exists
Known pipe types:
  wglGraphicsPipe
(all display modules loaded.)
:util(warning): Adjusting global clock's real time by 6.14639e-006 seconds.
:egg2pg(warning): AnimBundle UV_Streetscene_main does not specify a frame rate.

heres my code

import direct.directbase.DirectStart
from direct.task import Task
from direct.actor import Actor
import math

#Load the first environment model
environ = loader.loadModel("models/data/street-scene")
environ.reparentTo(render)
environ.setScale(0.25,0.25,0.25)
environ.setPos(-8,42,0)

[/code]

lets make the admin more mad jus cuz i can :slight_smile:

ok i got it to work thanks alot for your help :slight_smile:

  • slaps him self 1000 times *