Help! I keep getting this error while trying to compile my code:Warning: string has been automatically squish-ed!. Error at line 4. Warning: string has been automatically squish-ed!. Error at line 5. This token/function is not implemented (yet). Error at line 25
. Here is the program:
SourceCoder 3 (TAG) wrote:
:[i]TAG
:det(0)
:det(9,1)
:"02020444440444000400"->Str1
:"04040111110111000100"->Str2
:randInt(1,2)->I
:
:Str1->P
:Str2->L
:randInt(1,5)->R
:det(5,R)
:0->X:0->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
:
: If X=Z and Y=C:0->S:End
:
: If (X!=A and Y!=B) or (Z!=M and C!=N)
: BackgroundOn R
: det(58,P,X,Y)
: hdet(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
Here are 2 things I see:
Code:
hdet(58,L,Z,C)

Code:
BackgroundOn R
.
Heres an update:
SourceCoder 3 (TAG) wrote:
:[i]TAG
:det(0)
:det(9,1)
:"02020444440444000400"->Str1
:"04040111110111000100"->Str2
:randInt(1,2)->I
:
:Str1->P
:Str2->L
:randInt(1,5)->R
:det(5,R)
:0->X:0->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):Z-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
:
: If X=Z and Y=C:0->S:End
:
: If (X!=A and Y!=B) or (Z!=M and C!=N)
: RecallPic 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

same error tho
You never defined Z, so the pixel test may be testing the wrong pixel? Try defining Z to the value you want.
hold on even more of an update:
SourceCoder 3 (TAG) wrote:
:[i]TAG
:det(0)
:det(9,1)
:" 02020444440444000400"->P
:" 04040111110111000100"->L
:randInt(1,2)->I
:
:det(5,R)
:0->X:0->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 GetPixel(Y+1,X)!=0:Y+1->Y:End
: If K=24 and GetPixel(Y,X-1)!=0:X-1->X:End
: If K=26 and GetPixel(Y,X+1)!=0:X+1->X:End
: If K=25 and GetPixel(Y-1,X)!=0:Y-1->Y:End
:
: "P2 move"
: If K=21 and GetPixel(C+1,Z)!=0:C+1->C:End
: If K=31 and GetPixel(C,Z-1)!=0:Z-1->Z:End
: If K=41 and GetPixel(C,Z+1)!=0:Z+1->Z:End
: If K=32 and GetPixel(C-1,Z)!=0:C-1->C:End
:
: If X=Z and Y=C:0->S:End
:
: If X!=A or Y!=B or Z!=M or C!=N
:
: 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)
: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
:Return
ERROR on line... 58? there isnt a 58th line, and its an argument error
I believe that randInt() is not valid in ice
From what I've read (github documentation) it IS, but I guess sorcecoder doesn't read it as valid
Update, yet again an error! This token/function is not implemented (yet). Error at line 24. Even though i have checked and even took intentuionally slower and less effective paths for it to work, but am still getting error.
SourceCoder 3 (TAG) wrote:
:[i]TAG
:det(0)
:det(9,1)
:" 02020444440444000400"->P
:" 04040111110111000100"->L
:rand->Q
:remainder(Q,2)+1->I
:remainder(Q,5)+1->R
:det(5,R)
:0->X:0->Y:50->Z:50->C
:1000->S
:While S>0
: getKey->K
: X->A:Y->B:Z->M:C->N
:"P1 move"
: Y+1->T:If K=1:If det(7,X,T+`0:T->Y:End:End
: X-1->T:If K=2:If det(7,T,Y)`0:T->X:End:End
: X+1->T:If K=3:If det(7,T,Y+`0:T->X:End:End
: Y-1->T:If K=4:If det(7,X,T+`0:T->Y:End:End
:"P2 move"
: C+1->T:If K=47:If det(7,Z,T+`0:T->C:End:End
: Z-1->T:If K=48:If det(7,T,C+`0:T->Z:End:End
: Z+1->T:If K=40:If det(7,T,C+`0:T->Z:End:End
: C-1->T:If K=54:If det(7,Z,T+`0:T->C:End:End
:
: If X=Z and Y=C:0->S:End
:
: If z`A or {`B or Z`M or c`N
: det(58,P,X,Y)
: det(58,L,Z,C)
: det(2,224)
: det(33,0)
: If I=1:det(36,X+2,Y+2,1,1):End
: If I=2:det(36,Z+2,C+2,1,1):End
: det(10)
: End
: S-1->S
:End
:det(1)
:If X=Z and Y=C
: det(18,"Evader Tagged!",4,5)
: det(18,"TAGGER WINS!",5,5)
:Else
: det(18,"Time is up!",4,5)
: det(18,"EVADER WINS!",5,5)
:End
:Return
:
thanks to all that have helped so far!
More fixes, now its saying not enough args on.. line 86? that line dont EXIST!
SourceCoder 3 (TAG) wrote:
:[i]TAG
:det(0)
:det(9,1)
:" 02020444440444000400"->P
:" 04040111110111000100"->L
:rand->Q
:remainder(Q,2)+1->I
:remainder(Q,5)+1->R
:det(5,R)
:0->X:0->Y:50->Z:50->C
:1000->S
:
:While S>0
: getKey->K
: X->A:Y->B:Z->M:C->N
:
:"P1 move"
: Y+1->T:If K=1:If det(7,X,T)!=0:T->Y:End:End
: X-1->T:If K=2:If det(7,T,Y)!=0:T->X:End:End
: X+1->T:If K=3:If det(7,T,Y)!=0:T->X:End:End
: Y-1->T:If K=4:If det(7,X,T)!=0:T->Y:End:End
:
:"P2 move"
: C+1->T:If K=47:If det(7,Z,T)!=0:T->C:End:End
: Z-1->T:If K=48:If det(7,T,C)!=0:T->Z:End:End
: Z+1->T:If K=40:If det(7,T,C)!=0:T->Z:End:End
: C-1->T:If K=54:If det(7,Z,T)!=0:T->C:End:End
:
: If X=Z and Y=C:0->S:End
:
: If X!=A or Y!=B or Z!=M or C!=N
: det(58,P,X,Y)
: det(58,L,Z,C)
: det(2,224)
: det(33,0)
: If I=1:det(36,X+2,Y+2,1,1):End
: If I=2:det(36,Z+2,C+2,1,1):End
: det(10)
: End
:
: S-1->S
:End
:
:det(1)
:If X=Z and Y=C
: det(18,"Evader Tagged!",4,5)
: det(18,"TAGGER WINS!",5,5)
:Else
: det(18,"Time is up!",4,5)
: det(18,"EVADER WINS!",5,5)
:End
:Return
:
Are the errors coming from your calculator, or coming from something like sourcecoder?
I assume these are errors emitted from the ICE compiler available via SourceCoder, but I suspect ICE counts every colon as a new line rather than every actual newline. So if you split all your multi-statement lines into multiple actual lines then the line numbers should be more useful.
  
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