The following warnings occurred:
Warning [2] Undefined array key 0 - Line: 1677 - File: showthread.php PHP 8.2.31 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/showthread.php 1677 errorHandler->error_callback
/showthread.php 916 buildtree




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
compiler error (*solved*)
#1
im using the latest beta build

here is my source:
Code:
BORDER 7 : PAPER 7 : INK 0 : CLS PRINT AT 3,13 ; PAPER 1 ; INK 7 ; "BattleField" PRINT AT 5,9 ; PAPER 7 ; INK 0 ; "Q - Up" PRINT AT 6,9 ; PAPER 7 ; INK 0 ; "A - Down" PRINT AT 7,9 ; PAPER 7 ; INK 0 ; "O - Left" PRINT AT 8,9 ; PAPER 7 ; INK 0 ; "P - Right" PRINT AT 9,9 ; PAPER 7 ; INK 0 ; "M - Select" PRINT AT 10,3 ; PAPER 7 ; INK 0 ; "You have to select units" PRINT AT 11,3 ; PAPER 7 ; INK 0 ; "to fight the enemy units" PRINT AT 15,3 ; PAPER 7 ; INK 0 ; "Press any key to start" 60 LET j$ = INKEY$ IF j$ = "" THEN GOTO 60: END IF cls Dim BlueFactoryX (6) as uByte Dim BlueFactoryY (6) as uByte for x =1 to 6 BlueFactoryX(x) = byterndrange(1,30) BlueFactoryY(x) = byterndrange(1,30) next drawFactories() function drawFactories() for x =1 to 6 print at BlueFactoryX(x), BlueFactoryY(x); "O" next end function Function byterndrange (first As uByte, last As uByte) As uByte return Rnd * (last - first) + first End Function

here is the error message when I compile:



Quote:Traceback (most recent call last):
File "zxb.py", line 309, in <module>
File "zxb.py", line 242, in main
File "zxbtrad.pyc", line 316, in traverse
File "zxbtrad.pyc", line 1202, in traverse
File "zxbtrad.pyc", line 217, in emmit_let_left_part
TypeError: bad operand type for unary -: 'NoneType'


also it seems that underscores are not allowed in function names, is this right?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)