→ funnypeter:use absolute path not relative path 05/01 20:27
→ funnypeter:that's a common error 05/01 20:28
推 funnypeter:try a absolute path such as ~/script/images/.png 05/01 20:32
→ funnypeter:mkdir such path first of cours
請問F大,你是說最下面那行
要打player = pygame.images.load("script/images/dude.png ")嗎??e. 05/01 20:3
推 Microscft:么壽 網頁拉到最下面很驚人 這是一個13歲男孩寫的 05/01 20:46
※ 編輯: purestone (118.169.205.162), 05/01/2014 22:48:51
→ Microscft:...... 你是不是英文不太好 05/02 00:30
→ Microscft:你先去google什麼叫絕對路徑什麼叫相對路徑 05/02 00:31
→ Microscft:然後再去yahoo辭典查such as是什麼意思 05/02 00:32
推 jokester:python開啟文件時會展開~嗎? 05/02 00:50
→ apua:通常不會; 一樓應該只是提醒 05/02 02:04
推 funnypeter:絕對路徑:最前面有/開始 05/02 04:55
→ funnypeter:相對路徑沒有, 通常找不到是路徑設定錯誤 05/02 04:56
→ funnypeter:改成絕對路徑就不會發生找不到路徑的情況 05/02 04:57
→ funnypeter:~的意思是你的家目錄, /home/username 05/02 04:58
推 funnypeter:~/script/images/.png 意思是/home/username/script/im 05/02 05:00
→ funnypeter:ages/.png 05/02 05:00
→ funnypeter:當然你要先mkdir建立該目錄 05/02 05:01
→ funnypeter:路徑改成 我上述說的絕對路徑看看 05/02 05:02
→ funnypeter:這是初學者常見的錯誤 05/02 05:03
推 funnypeter:dude.png當然要移動到該目錄內 05/02 05:05
→ funnypeter:username改成你的名字 05/02 05:06
→ funnypeter:我這裡舉的路徑只是例子,你也可以用~/images/.png 05/02 05:07
推 funnypeter:你試試看 cd~ 05/02 05:09
→ funnypeter:然後打pwd就知道了 05/02 05:10
→ funnypeter:自己寫程式不要都照抄,要自己改環境變數,這是很常見 05/02 05:11
→ funnypeter:的修改 05/02 05:11
→ purestone:謝謝! 05/02 06:43