Skip to main content
gamedev.net
🔒 Locked

Help Java and Midlet

Started by giuseppeCT 1 reply 700+ views
Original Post
giuseppeCT
giuseppeCT
Hola, may someone tell me what's the difference between those two lines of code????

int current=0;
String t = Maps[current].gfx; //gfx is a string class with "/map0.png" loaded
gfxMaps = Image.createImage( t );
and

String t = "/map0.png";
gfxMaps = Image.createImage( t );
first one doesn't works, second yes !!! WHY????????????? PLEEZ HELP !!!
giuseppeCT
giuseppeCT
ok, sorry problem resolved, just a \r inside the string :) !!!
kooktroop
kooktroop
gfx doesnt seem a very appropriate name for a String containing the file name of the image. You should change it to fileName.
Do not remove a fly from your friend's forehead with a hatchet.Chinese Proverb

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.