So i was making this ICE program and SourceCoder3 kept giving me this error:Error on line 37 at "... <br />det(10)<br />End<br />(T...".<br />. Pleas, help and fix that error! Thanks in advance! 👍 Graphing Calculator 😁
SourceCoder 3 (DIP) wrote:
:[i]TAGGAME
:det(0)
:det(9,1)
:"02020444440444000400"->Str1
:"04040111110111000100"->Str2
:randInt(1,2)->I
:sum(1,Str1)->P
:sum(1,Str2)->L
:randInt(1,5)->R
:BackgroundOn R
:10->X:10->Y:50->Z:50->C
:1000->T
:While T>0 and (X!=Z or Y!=C)
: getKey->K
: X->A:Y->B:Z->M:C->N
: "i know its ugly just STFU"
:
: "player 1"
: If K=34 and pxl-Test(Y+1,X)!=0 :Y+1->Y :End
: If K=24 and pxl-Test(Y,X-1)!=0 :X-1->X :End
: If K=26 and pxl-Test(Y,X+1)!=0 :X+1->X :End
: If K=25 and pxl-Test(Y-1,X)!=0 :Y-1->Y :End
:
: "player 2"
: If K=21 and pxl-Test(C+1,Z)!=0 :C+1->C :End
: If K=31 and pxl-Test(C,Z-1)!=0 :Z-1->Z :End
: If K=41 and pxl-Test(C,Z+1)!=0 :Z+1->Z :End
: If K=32 and pxl-Test(C-1,Z)!=0 :C-1->C :End
:
: "drawsprite"
: If X!=A or Y!=B or Z!=M or C!=N
: BackgroundOn R
: "det(58,P,X,Y)
: "det(58,L,Z,C)
: det(2,224)
: If I=1:FillRectangle(X,Y,1,1):End
: If I=2:FillRectangle(Z,C,1,1):End
: det(10)
: End
: (T-1)->T
:End
:det(1)
:ClrHome
:If X=Z and Y=C
: Output(4,5,"Evader Tagged!")
: Output(5,5,"TAGGER WINS!")
:Else
: Output(4,5,"Time is up!")
: Output(5,5,"EVADER WINS!")
:End
Great just one change and its good now no help needed!
More code, i fixed the problem (thanks to pi644721 for suggesting adding a Then, but in the end that was not needed!), but now a new problem appeared, it wasnt compiling properly:"Warning: string has been automatically squish-ed!. Error at line 4. Warning: string has been automatically squish-ed!. Error at line 5. You have the wrong number or arguments. Error at line 7" here is the code again
SourceCoder 3 (TAG) wrote:
:[i]TAG
:det(0)
:det(9,1)
:"04040222220222000200"->Str1
:"05050111110111000100"->Str2
:randInt(1,2)->I
:sum(1,Str1)->P
:sum(1,Str2)->L
:randInt(1,5)->R
:BackgroundOn R
:10->X:10->Y:50->Z:50->C
:1000->S
:While S>0
: getKey->K
: X->A:Y->B:Z->M:C->N
:
: "P1 MOVE"
: If K=34 and pxl-Test(Y+1,X):Y+1->Y:End
: If K=24 and pxl-Test(Y,X-1):X-1->X:End
: If K=26 and pxl-Test(Y,X+1):X+1->X:End
: If K=25 and pxl-Test(Y-1,X):Y-1->Y:End
:
: "P2 MOVE"
: If K=21 and pxl-Test(C+1,Z):C+1->C:End
: If K=31 and pxl-Test(C,Z-1):C-1->Z:End
: If K=41 and pxl-Test(C,Z+1):Z+1->Z:End
: If K=32 and pxl-Test(C-1,Z):C-1->C:End
:
: "TAG CHECK"
: If X=Z and Y=C:0->S:End
:
: "DRAW"
: If X!=A or Y!=B or Z!=M or C!=N
: BackgroundOn R
: det(58,P,X,Y)
: det(58,L,Z,C)
: det(2,224)
: det(33,0)
: If I=1:FillRectangle(X+2,Y+2,1,1):End
: If I=2:FillRectangle(Z+2,C+2,1,1):End
: det(10)
: End
: S-1->S
:End
:det(1)
:ClrHome
:If X=Z and Y=C
: Output(4,5,"Evader Tagged!")
: Output(5,5,"TAGGER WINS!")
:Else
: Output(4,5,"Time is up!")
: Output(5,5,"EVADER WINS!")
:End
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement