Hey I'm dabbling in a Basic game that's like Mortal Kombat based upon one I believe I saw on a TI 84? anyways I'm stuck at this point converting things.. I keep getting Syntax errors, anyone know why? (I personally think that it's the space and Greater than or equal to sign)


Code:

J=11 =>Locate 10,2,"M"
J=12 =>Locate 11,2,"O"
J=13 =>Locate 12,2,"R"
J=14 =>Locate 13,2,"T"
J=15 =>Locate 14,2,"A"
J=16 =>Locate 15,2,"L"


also I'm still working on RLP, don't worry, however If I can, I believe I will do a C AND a BASIC Version of the game, seeing as the original is ASCII
Why are you locating each character individually? Why not do the entire string at once?

Also, IIRC, I think that the => operator (which I know to be a single operator, not an equals and a greater than sign like you have there) only accepts a jump, not an expression.
Compynerd255 wrote:
Why are you locating each character individually? Why not do the entire string at once?

Also, IIRC, I think that the => operator (which I know to be a single operator, not an equals and a greater than sign like you have there) only accepts a jump, not an expression.


No, it accepts an expression.


Code:

<condition> => <if condition is true do this, otherwise, skip it and continue to next line>
So...how do I make this work?

I also have a Getkey line like this


Code:

If Getkey=31 And E=/=3
Then For 1->A To 5
You might want to do this for mortal:


Code:

"MORTAL" -> Str 1
For 0 -> I to 5 Step 1
Locate I+10,2,strmid(I,I+1,str 1)
Next


I did not test this code, but am just giving you an idea Wink
Well I tried it but I got a Syntax error on the "locate I+10,2,StrMid(I,I+1,Str 1) Line
Well first you need to understand the syntax for the StrMid command. It is: StrMid("string" or str#, starting pos, ending pos) if you leave out ending pos it will take from starting to the end of the string. So you need something like this:

Code:

StrMid(Str 1, I, I+1

So in your loop:

Code:

"MORTAL" -> Str 1 
For 0 -> I to 5 
Locate I+10,2,strmid(str 1, I, I+1) 
Next 

Note if you leave out the "step" in the for loop, it will automatically revert to 1.
Edit: 400th post! (:
but that's basically what I just put down in a reverse order? anyways Now it says "out of domain" -_- instead of the syntax error.

Edit: I shifted it around to say

Code:

Locate I+10,2,StrMid(Str 1,I+1,I)
Next


it sort of works but now says syntax error, I'm assuming it is because My code ends there for now!

I'll do more and post some more here in a little bit Very Happy thanks for helping
Yeah I just realized that Razz I just copied flying fish's code and changed it. So I didn't see the domain error. Here try this:

Code:

"MORTAL" -> Str 1   
For 1 -> I to 6   
Locate I,2,strmid(str 1, I, I+1)   
Next   

Note this is pretty fast, you might want to slow it down.
My way I have is the only one that works, Your new line gives Domain errors because to work it needs that "Locate I+10,2StrMid(Str 1,I+1,I)

as for slowing it down...could I just use


Code:

For x=x+1
If x=100
Then
End


just to take up time?
Huh? I have it on my prizm and it works. I was messing around and I like the looks of this:

Code:

ClrText
"M--O--R--T--A--L"->Str1 ;"-" is a space
For 1-> I To 16
Locate I+2, 1, StrMid(Str1, I, I+1)
;my slow down loop
For 1->A To 100
Next
Next

Just mess around with the code untill it looks like what you want.
I'll just post what I have and you tell me how it looks so far? cause next I'm going to write "Kombat" either below Mortal or beside it


Code:

6 ->J
ClrText
Locate 1,4,"--------------------"  (21 -'s
Locate 3,1,"O"
Locate 2,2,"-I-*"    (the * is the mult. Symbol
Locate 2,3,"I I"
For 1 ->A to 7
Locate 5,2,"+"
Locate 5,2,"*"    (the * is the mult. Symbol
Locate 5,2," "   (1 spc.
Next
Locate 2,2," "
Locate 4,4,"="
Locate 5,2," "
for 1 ->A to 12
Locate J-1,2," "
Locate J,2,"*"
Locate J,2,"+"
" Mortal"->Str 1
For 0->I To 6
Locate I+10,2,StrMid(Str 1,I+1,I)
Next
Locate 17,2," "
Locate 18,5,"O"
Locate 16,6,"*-I-"
Locate 17,7,"I I"
15 ->J
For 1 ->A to 7
Locate 16,6,"+"
Locate 16,6,"*"
Locate 16,6," "
Next
Locate 20,6," "
Locate 17,6,"="
Locate 16,6," "
For 1 ->A to 12
Locate J+1,6," "
Locate J,6,"*"
Locate J,6,"+"
Haha I like it. It's pretty neat. Now just have the bottom guy shoot out "Kombat" and it will be pretty spiffy.
well I don't know how to make him do that..I'm porting this over from TI code or something of the sort...so It looks completely different, not to mention this is as far as it got -_-...So I'm trying to rewrite and finish this unfinished project.

How would I make it spit out Kombat?...I guess I could move the name as a string from the guys "head" to the center bottom right?
Well you could display the string backwards. Start at displaying 1 character at 1 space in front of him, 2 at two spaces away, etc. If you need example code I can help.
Yes backwards is what I was thinking, I have an additional Idea...Since prizm basic is still faster than TI...I'd like the text to come in spelled backwards in "Kombat" as "tabmoK" and the flip around to "Kombat"!...hmm, this could be a collaboration of sorts! I've got most of the main code "written" just not tested.
The_Coded wrote:
Since prizm basic is still faster than TI...

Actually...Prizm basic is slower than Ti-basic. But it does have color.
The flipped idea sounds great!
Huh, I guess since Switch Rpg has spoiled me, I thought it was faster...although it IS slow on my TI 83+...I'm sure Prizm Basic is faster than that one!...oh well...COLOURS YAY!
What's your next plan of action after finishing your title screen?
well, Since I just found out it doesn't matter if I use 5 colors or just 1 the speed is the same...either making it colourful or starting the games controls..though I need a Key number chart for that because I'm assuming it's Get Key( numbers are not exactly the same as TI's
  
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 3
» 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