Discussion forum about PANORAMIC language
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Discussion forum about PANORAMIC language

Mac, Windows & Android application development with PANORAMIC language
 
HomeHome  SearchSearch  Latest imagesLatest images  RegisterRegister  Log in  
Latest topics
» What happened with the panoramic language ?
by Wed Jan 03, 2024 4:09 pm

» Hello world.
by Wed May 09, 2018 11:53 pm

» Biomorphes de PICKOVER
by Sun Jun 18, 2017 2:33 am

» In less than 10 lines of code
by Fri Jun 16, 2017 5:03 am

» Effect Dopler
by Fri Jun 16, 2017 3:29 am

» SuperEllipse
by Wed Jun 14, 2017 4:01 am

» Plants
by Wed Jun 14, 2017 3:38 am

» Mira's attractor
by Wed Jun 14, 2017 3:30 am

» Triangle of Sierpinski
by Wed Jun 14, 2017 3:22 am

» Esthétique polaire
by Wed Jun 14, 2017 3:16 am

» Butterfly effect : Lorenz equations
by Wed Jun 14, 2017 3:08 am

» Collision detection
by Tue Jun 13, 2017 5:09 am

» The Bees Laline Paull Epub Books
by Mon Oct 10, 2016 8:58 pm

» PANORAMIC for Mac OSX 10 is available
by Tue Aug 09, 2016 6:08 pm

» ide
by Sat Jul 16, 2016 12:27 am

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

 

 Bug? 3d_load_texture is case sensitive using a variable

Go down 
2 posters
AuthorMessage
kawe




Number of posts : 18
Registration date : 2010-11-07

Bug? 3d_load_texture is case sensitive using a variable Empty
PostSubject: Bug? 3d_load_texture is case sensitive using a variable   Bug? 3d_load_texture is case sensitive using a variable EmptyTue Nov 16, 2010 6:54 pm

Config: Panoramic 0.9.20i2 on WinXPSP3

The following code will result in a : "(128) Not correct file format:. Line : 7"
no matter what file has been selected (valid or not):

1 dim a$
2 scene3d 1
3 full_space 1
4 open_dialog 2
5 a$=file_name$(2)
6 3d_sphere 3,1
7 if a$<>"_" then 3d_load_texture 3,a$ ' <-- not ok

if you replace line 7 by

7 if a$<>"_" then 3d_load_texture 3,upper$(a$) ' <-- ok

the code runs as expected.

However, this case sensitive behaviour does not occur with all commands
(e.g. '3d_load_object' doesn't behave this way) and will also not arise if you use a literal string:

7 if a$<>"_" then 3d_load_texture 3,"c:\temp\x.bmp" ' <--ok


btw:
1) is there anywhere a documentation of the error numbers (here: 128)?
Of course you will get these numbers at runtime, but you might want to handle them in the code before they arise ...
2) Unlike stated in the docs 3d_load_texture does not only work with bmp but at least also with jpeg files, :-)

Stephan
Back to top Go down
Jack
Admin
Jack


Number of posts : 99
Registration date : 2007-07-01

Bug? 3d_load_texture is case sensitive using a variable Empty
PostSubject: Re: Bug? 3d_load_texture is case sensitive using a variable   Bug? 3d_load_texture is case sensitive using a variable EmptyWed Nov 17, 2010 6:37 pm

I checked your programm on several computer under several configurations with a BMP file and I have no error at line 7
Code:
dim a$
scene3d 1
full_space 1
open_dialog 2
a$=file_name$(2)
3d_sphere 3,1
if a$<>"_" then 3d_load_texture 3,a$
Works prefectly

The error code number is not generated at run time.
Each type of error has its number and it can be read:
ERROR_NUMBER returns the number (128)
ERROR_TYPE$ returns the type (Not correct file format)

Here is the list of all the possible errors:
Quote :
001 More OBJECTS than Allowed Number
002 More IF than Allowed Number
003 More ELSE than Allowed Number
004 More END_IF than Allowed Number
005 More END_IF than IF
006 More IF than END_IF
007 More ELSE than IF
008 More ELSE than END_IF
009 More NEXT than FOR
010 More FOR than NEXT
011 More Loops FOR/NEXT than Allowed Number
012 More END_WHILE than WHILE
013 More WHILE than END_WHILE
014 More Loops WHILE/END_WHILE than Allowed Number
015 More Loops REPEAT/UNTIL than Allowed Number
016 More UNTIL than REPEAT
017 More REPEAT than UNTIL
018 More END_SELECT than SELECT
019 More SELECT than END_SELECT
020 More Structures SELECT/END_SELECT than Allowed Number
021 More CASE than Allowed Number
022 Error in Value after CASE
023 Two CASE with the Same Value
024 Not Correct Expression : Error in Parameter Number
025 = Is Missing
026 "TO" Is Missing
027 Illegal Variable Name
028 Not Defined Variable (DIM)
029 Not Correct Artithmetic Expression : +++
030 Array Index OverFlow Or UnderFlow
031 Not Correct Expression in Variable Index of Array
032 Illegal Instruction
033 Not Correct Logical Expression : +++
034 No Corresponding END_IF Found
035 Name Already Defined
036 Too Many Dimensions in Array Variable
037 Used Name is a Function Name
038 Not Correct Array Size
039 Allowed Capacity of Array Exceeded
040 More Variables than Allowed Number
041 Loop FOR/NEXT : Variable Must Be Simple Integer or Simple Real
042 Loop FOR/NEXT : Not Correct START Expression : +++
043 Error in Loop FOR/NEXT
044 Loop FOR/NEXT : Not Correct END Expression : +++
045 Loop FOR/NEXT : Not Correct STEP Expression : +++
046 Not Correct Expression in OBJECT Number : +++
047 OBJECT Number Out Of Range
048 Not Correct Expression
049 System Not Able to PLAY a Sound
050 Not Successful Command For This Kind of OBJECT
051 OBJECT Does Not Exist (Not Created)
052 Not Correct STRING Expression : +++
053 Not Correct Expression in 3D OBJECT Number : +++
054 Not Correct Expression in SPRITE Number : +++
055 Not Correct Expression in FILE Number : +++
056 Not A Legal Label
057 WAIT Value Must Be Between 1 and 30000
058 Loop FOR/NEXT : Error in the Structure
059 No DATA Found
060 Out Of Data
061 STOP at Line
062 OBJECT Already Defined
063 Value Must Be Between -2000 and 2000
064 Error in SELECT / END_SELECT Structure
065 No Corresponding END_IF Found
066 No Corresponding END_WHILE Found
067 No Corresponding REPEAT Found
068 Label Defined Twice
069 More LABELS than Allowed Number
070 Label Not Defined (LABEL)
071 More GOSUB than Allowed Number
072 Value Must Be Between 1 and 2000
073 Value Must Be Between 1 and 30
074 Value Must Be Between 1 and 20
075 Value Must Be Between 0 and 255
076 3D OBJECT Number Out Of Range
077 SPRITE Number Out Of Range
078 FILE Number Out Of Range
079 Zero or Negative Value
080 No SCENE3D to Receive this 3D OBJECT
081 No SCENE3D is Created
082 3D OBJECT Already Defined
083 RETURN Without GOSUB
084 FORM0 Cannot Be Deleted
085 OBJECT is a 2D TARGET and Cannot Be Deleted
086 OBJECT is a COMMAND TARGET and Cannot Be Deleted
087 OBJECT is a PRINT TARGET and Cannot Be Deleted
088 An OBJECT Cannot Be Father Of Itself
089 Impossible to Link
090 No SCENE2D to Receive this SPRITE
091 SPRITE Number Already Defined
092 3D OBJECT Does Not Exist (Not Created)
093 FILE Does Not Exist (Not Created)
094 No Loop FOR / NEXT
095 No Loop WHILE / END_WHILE
096 No Loop REPEAT / UNTIL
097 Impossible to Execute
098 Not Successful Command For This Kind of 3D OBJECT
099 Impossible to Load the FILE
100 A 3D OBJECT Cannot Be Chained To Itself
101 3D OBJECT Is Already Chained
102 Impossible To Create Directory
103 FILE Number Not Used For Reading
104 3D OBJECT Cannot Be Deleted : Has One or Several Children
105 Impossible to Save to the FILE
106 No Corresponding WHILE Found
107 Excel Not Running
108 FILE Number Not Defined
109 FILE Number Not Used For Writing
110 Excel Already Running
111 Impossible To Run Excel
112 No FILE Opened
113 FILE Already Exists
114 SPRITE Does Not Exist (Not Created)
115 Parallel Port is Already ON
116 Inpout32.dll Is Not Ready
117 Only Chain Variable Can Be Used
118 Parallel Port is Not ON
119 Parallel Port is Already OFF
120 PORT Number Out Of Range
121 Value Must Be Greater Than 0 and Less Than 200
122 FILE Already Used
123 A 3D OBJECT Cannot Point Itself
124 3D OBJECT Has No Father Or Not This Father
125 Negative Value
126 No Valid Mail Address
127 Impossible To Send Mail
128 Not Correct File Format
129 Value Must Be Between 1 and 32
130 Value Must Be Between 1 and 127
131 MIDI Output is Not ON
132 MIDI Output is Already ON
133 Not Possible to use MIDI Output
134 MIDI Note Out of Range
135 MIDI Note Type Out of Range
136 Impossible To Load DLL
137 No DLL in Use
138 A DLL is Already Used
139 Impossible to Remove Directory (not empty or protected)
For +++ (error number 029,033,042,044,045,046,052,053,054,055):
Quote :
Use FILE_FIND_FIRST$ before FILE_FIND_NEXT$
Index Overflow
More SPRITES than Allowed Number
More 3D OBJECTS than Allowed Number
Sequence Error, Bad Character
Error When Dividing
Number Not Between -1 and 1
OBJECT Number Out Of Range
3D OBJECT Number Out Of Range
OBJECT Does Not Exist (Not Created)
Not Successful Function For This Kind of OBJECT
Error in Function
FILE Number Out Of Range
PORT Number Out Of Range
FILE Number Not Defined
Parallel Port is not ON
Function Call With Negative or Zero Value
Function Call With Value Greater Than 200
Function Call With Invalid Character
Function Call With Negative Value
Function Call With Value Greater Than 255
Excel Not Running
No FILE Opened
Illegal Variable Name
Not Defined Variable (DIM)
Not Correct Expression : +++
Array Index OverFlow Or UnderFlow
Not Correct Expression in Variable Index of Array


I will add in the documentation that JPG can be loaded as texture
Back to top Go down
https://panoramic.forumotion.com
kawe




Number of posts : 18
Registration date : 2010-11-07

Bug? 3d_load_texture is case sensitive using a variable Empty
PostSubject: Re: Bug? 3d_load_texture is case sensitive using a variable   Bug? 3d_load_texture is case sensitive using a variable EmptyThu Nov 18, 2010 9:05 pm

Funny, I cannot only reproduce this problem on another system (this one Win2kSP4) even with the standard Windows bmp-files.
I can also avoid this error by renaming (e. g. xyz.bmp --> xyz.BMP).

Thanks for the error list.

Back to top Go down
Sponsored content





Bug? 3d_load_texture is case sensitive using a variable Empty
PostSubject: Re: Bug? 3d_load_texture is case sensitive using a variable   Bug? 3d_load_texture is case sensitive using a variable Empty

Back to top Go down
 
Bug? 3d_load_texture is case sensitive using a variable
Back to top 
Page 1 of 1
 Similar topics
-
» Internal Structure of Arrays (and Variable Types)?

Permissions in this forum:You cannot reply to topics in this forum
Discussion forum about PANORAMIC language :: Panoramic for Windows :: Help?-
Jump to: