Author Topic: Bizzare Problem with RPGCode?!?!  (Read 2106 times)

sdupont

  • Member
  • *
  • Posts: 1
    • View Profile
Bizzare Problem with RPGCode?!?!
« on: June 27, 2007, 09:06:17 AM »
i`m creating a CMS (Custom Menu System) for my game,
but i`ve run into a uuhhh... strange error.

code:
Code: [Select]
i! = pc1_nextSlot!
.
.
.
until(i! == 20)
{
text(16, 1.5, i!)
y! = 4
text(6, y!, items[pc1[i!][0]!][0]$)
text(16, y!, "x" + castLit(pc1[i!][1]!))
y! += 1.5
text(6, y!, i!)
i!++
}
Output i should get:
Quote
0
potion    x1
Cancel
0

output i`m getting:
Quote
0
Cancel         x0
??
     
What The :censored: ?!?!?!?! Confused  Confused
« Last Edit: December 31, 1969, 06:00:00 PM by Guest »

Asimir

  • Member
  • *
  • Posts: 333
    • View Profile
Re: Bizzare Problem with RPGCode?!?!
« Reply #1 on: June 27, 2007, 01:34:24 PM »
Quote from: "sdupont"
Output i should get:
Quote
0
potion    x1
Cancel
0
   
I don't see where that "Cancel" should come from.

With your code, the dots on the second, third and fourth lines are obviously going to cause problems, but I guess you added them just for posting.
It looks like your code is supposed to write the numbers 0 through to 19 on top of each other in two different places and write the names of 20 different items on top of each other, with the number of each item next to them, also all on top of each other.
The code looks like it should be outputting something different to what you say it should output. If you edited the code before posting, to try to get rid of irrelevant parts, maybe you accidentally got rid of something important. If this is the case, post the whole of your original until loop.
« Last Edit: December 31, 1969, 06:00:00 PM by Asimir »

dooms102

  • Member
  • *
  • Posts: 59
    • View Profile
Re: Bizzare Problem with RPGCode?!?!
« Reply #2 on: June 27, 2007, 04:34:44 PM »
well to start off with, I can't realy help too much because I don't know the value for a few of your varialbes. but I will say that the "." on lines 2-4 probably shouldn't be there. and I think your biggest problem is the:

Code: [Select]
  text(16, y!, "x" + castLit(pc1[i!][1]!))
I think what you were trying to do should look like this:

Code: [Select]
  text(16, y!, "x<pc1[i!]1!>")
and I am not sure were the text "Potion" or "Cancel" are coming from.
« Last Edit: December 31, 1969, 06:00:00 PM by Guest »
Quote Dragonminded:
"Please note that the microphone quality is something a few steps lower of microwaved ass, so don\'t expect production quality from this feature."

Colin

  • Member
  • *
  • Posts: 299
    • View Profile
Re: Bizzare Problem with RPGCode?!?!
« Reply #3 on: June 27, 2007, 04:44:04 PM »
The suggestion you offer actually introduces an error; pc1[i!][1]! is the correct syntax, not pc1[i!]1! .

One problem might from using an numerical value for the string in text(), e.g.,

Code: [Select]
text(6, y!, i!)
Try

Code: [Select]
text(6, y!, castLit(i!))
« Last Edit: December 31, 1969, 06:00:00 PM by Guest »
— Colin