Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Loading Up..
#1
Problem: Doesn't load up (or save) individually as a different number

Code:
DefaultMove(1 To 3) As Byte
    
    LearnMove(1 To 10) As Byte
    LearnLevel(1 To 10) As Byte

Code:
For i = 1 To 3
        Pokemon(n).DefaultMove(i) = Val(Parse(9))
    Next i
    
    For i = 1 To 10
        Pokemon(n).LearnMove(i) = Val(Parse(10))
        Pokemon(n).LearnLevel(i) = Val(Parse(11))
    Next i
Reply
#2
Where did you put:

Code:
DefaultMove(1 To 3) As Byte
  
    LearnMove(1 To 10) As Byte
    LearnLevel(1 To 10) As Byte
Reply
#3
in my PokémonRec

Is it because I can't send my packets this way?

Quote:With Pokemon(PokemonNum)
For I = 1 To 3
For n = 1 To 10
Packet = "SAVEPOKEMON" & SEP_CHAR & PokemonNum & SEP_CHAR & Trim(.Name) & SEP_CHAR & .Sprite & SEP_CHAR & .spritesheet & SEP_CHAR & .Type1 & SEP_CHAR & .Type2 & SEP_CHAR & .Evolve & SEP_CHAR & .EvolveLevel & SEP_CHAR & .DefaultMove(I) & SEP_CHAR & .LearnMove(n) & SEP_CHAR & .LearnLevel(n) & SEP_CHAR & END_CHAR
Next n
Next I
End With
Reply
#4
TonyNooblet Wrote:in my PokémonRec

Is it because I can't send my packets this way?

Quote:With Pokemon(PokemonNum)
For I = 1 To 3
For n = 1 To 10
Packet = "SAVEPOKEMON" & SEP_CHAR & PokemonNum & SEP_CHAR & Trim(.Name) & SEP_CHAR & .Sprite & SEP_CHAR & .spritesheet & SEP_CHAR & .Type1 & SEP_CHAR & .Type2 & SEP_CHAR & .Evolve & SEP_CHAR & .EvolveLevel & SEP_CHAR & .DefaultMove(I) & SEP_CHAR & .LearnMove(n) & SEP_CHAR & .LearnLevel(n) & SEP_CHAR & END_CHAR
Next n
Next I
End With

Code:
& SEP_CHAR & END_CHAR

What?
Reply
#5
What about it?..
Reply
#6
What the hell are you doing to that poor packet?!
Reply
#7
Fox Wrote:What the hell are you doing to that poor packet?!

Waah1?!!? So so so I would have to type it out 1 to 10?
Reply
#8
I can see what you are doing,

If you MUST do it that way at least put the loop outside of the packet event procedure, have the loop where the packet event proc~ is called and just feed the variable into it.
Reply
#9
Code:
Dim i As Long
Dim n As Long

   Packet = "SAVEPOKEMON" & SEP_CHAR & PokemonNum & SEP_CHAR & Trim(Pokemon(PokemonNum).Name) & SEP_CHAR & Pokemon(PokemonNum).Sprite & SEP_CHAR & Pokemon(PokemonNum).spritesheet & SEP_CHAR & Pokemon(PokemonNum).Type1 & SEP_CHAR & Pokemon(PokemonNum).Type2 & SEP_CHAR & Pokemon(PokemonNum).Evolve & SEP_CHAR & Pokemon(PokemonNum).EvolveLevel & SEP_CHAR

    For I = 1 To 3
       Packet = Packet & Pokemon(PokemonNum).DefaultMove(I) & SEP_CHAR
    Next I
    For n = 1 To 10
       Packet = Packet & Pokemon(PokemonNum).LearnMove(n) & SEP_CHAR & Pokemon(PokemonNum).LearnLevel(n)
    Next n

    Packet = Packet & END_CHAR
    SendData(Packet)
Fixed... I guess.
Reply
#10
Just put a "sendata packet" below this:

Code:
Packet = "SAVEPOKEMON" & SEP_CHAR & PokemonNum & SEP_CHAR & Trim(.Name) & SEP_CHAR & .Sprite & SEP_CHAR & .spritesheet & SEP_CHAR & .Type1 & SEP_CHAR & .Type2 & SEP_CHAR & .Evolve & SEP_CHAR & .EvolveLevel & SEP_CHAR & .DefaultMove(I) & SEP_CHAR & .LearnMove(n) & SEP_CHAR & .LearnLevel(n) & SEP_CHAR & END_CHAR
Reply
#11
William Wrote:Just put a "sendata packet" below this
Guess this is not what he needs. He wants to save an edited Pokémon.
Lots of DefaultMove(), LearnMove() and LearnLevel() in only ONE Pokémon (and packet).
The code I posted does it.

Sorry for bad English.
Reply
#12
Fox Wrote:What the hell are you doing to that poor packet?!

Haha I lol'd.
Reply
#13
Kraft hit it on the head.
Reply
#14
Perfekt Wrote:Kraft hit it on the head.
Sorry, but what does it means? Tongue
Reply
#15
Fox Wrote:I can see what you are doing,

If you MUST do it that way at least put the loop outside of the packet event procedure, have the loop where the packet event proc~ is called and just feed the variable into it.

But wouldn't that be sending amounts of packets?
Reply
#16
Looked like that was what you were doing until Kraft cleaned it up.
Reply
#17
Fox Wrote:Looked like that was what you were doing until Kraft cleaned it up.

Didn't understand The "For" command as much as I do right now ">.>

Is this the proper way to receive it

Quote:For i = 1 To 3
Pokemon(n).DefaultMove(i) = Val(Parse(i + 8))
Next i

For i = 1 To 10
Pokemon(n).LearnMove(i) = Val(Parse(i + 9))
Pokemon(n).LearnLevel(i) = Val(Parse(i + 10))
Next i

edit;
Code:
For i = 1 To 3
        Pokemon(n).DefaultMove(i) = Val(Parse(i + 8))
    Next i
    
    For i = 1 To 10
        Pokemon(n).LearnMove(i) = Val(Parse((i * 2) + 11))
        Pokemon(n).LearnLevel(i) = Val(Parse((i * 2) + 11))
    Next i
Reply
#18
Kraft Wrote:
Perfekt Wrote:Kraft hit it on the head.
Sorry, but what does it means? Tongue

Means you hit the nail on the head perfectly. You showed him exactly what was wrong with his code. Big Grin
Reply
#19
Perfekt Wrote:
Kraft Wrote:Sorry, but what does it means? Tongue
Means you hit the nail on the head perfectly. You showed him exactly what was wrong with his code. Big Grin
Oh, I see!
Glad it's good stuff. Thank you! Tongue
Reply
#20
Me too
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)