| Mirage Source http://www.miragesource.net/forums/ |
|
| Loading Up.. http://www.miragesource.net/forums/viewtopic.php?f=201&t=4790 |
Page 1 of 2 |
| Author: | Tony [ Wed Nov 26, 2008 3:33 am ] |
| Post subject: | Loading Up.. |
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 |
|
| Author: | William [ Wed Nov 26, 2008 7:35 pm ] |
| Post subject: | Re: Loading Up.. |
Where did you put: Code: DefaultMove(1 To 3) As Byte
LearnMove(1 To 10) As Byte LearnLevel(1 To 10) As Byte |
|
| Author: | Tony [ Thu Nov 27, 2008 12:02 am ] |
| Post subject: | Re: Loading Up.. |
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 |
|
| Author: | Mattyw [ Thu Nov 27, 2008 12:44 am ] |
| Post subject: | Re: Loading Up.. |
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? |
|
| Author: | Tony [ Thu Nov 27, 2008 2:29 am ] |
| Post subject: | Re: Loading Up.. |
What about it?.. <.<" |
|
| Author: | Coke [ Thu Nov 27, 2008 10:17 am ] |
| Post subject: | Re: Loading Up.. |
What the hell are you doing to that poor packet?! |
|
| Author: | Tony [ Thu Nov 27, 2008 10:42 am ] |
| Post subject: | Re: Loading Up.. |
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? |
|
| Author: | Coke [ Thu Nov 27, 2008 12:58 pm ] |
| Post subject: | Re: Loading Up.. |
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. |
|
| Author: | Kraft [ Thu Nov 27, 2008 3:02 pm ] |
| Post subject: | Re: Loading Up.. |
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. |
|
| Author: | William [ Thu Nov 27, 2008 3:47 pm ] |
| Post subject: | Re: Loading Up.. |
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
|
|
| Author: | Kraft [ Thu Nov 27, 2008 4:42 pm ] |
| Post subject: | Re: Loading Up.. |
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. |
|
| Author: | GIAKEN [ Thu Nov 27, 2008 4:54 pm ] |
| Post subject: | Re: Loading Up.. |
Fox wrote: What the hell are you doing to that poor packet?! Haha I lol'd. |
|
| Author: | Matt [ Thu Nov 27, 2008 5:10 pm ] |
| Post subject: | Re: Loading Up.. |
Kraft hit it on the head. |
|
| Author: | Kraft [ Thu Nov 27, 2008 5:17 pm ] |
| Post subject: | Re: Loading Up.. |
Perfekt wrote: Kraft hit it on the head. Sorry, but what does it means? |
|
| Author: | Tony [ Thu Nov 27, 2008 5:26 pm ] |
| Post subject: | Re: Loading Up.. |
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? |
|
| Author: | Coke [ Thu Nov 27, 2008 5:35 pm ] |
| Post subject: | Re: Loading Up.. |
Looked like that was what you were doing until Kraft cleaned it up. |
|
| Author: | Tony [ Thu Nov 27, 2008 5:40 pm ] |
| Post subject: | Re: Loading Up.. |
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 + 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 |
|
| Author: | Matt [ Fri Nov 28, 2008 1:19 am ] |
| Post subject: | Re: Loading Up.. |
Kraft wrote: Perfekt wrote: Kraft hit it on the head. Sorry, but what does it means? Means you hit the nail on the head perfectly. You showed him exactly what was wrong with his code. |
|
| Author: | Kraft [ Fri Nov 28, 2008 3:00 am ] |
| Post subject: | Re: Loading Up.. |
Perfekt wrote: Kraft wrote: Sorry, but what does it means? Means you hit the nail on the head perfectly. You showed him exactly what was wrong with his code. Oh, I see! Glad it's good stuff. Thank you! |
|
| Author: | Tony [ Fri Nov 28, 2008 4:32 am ] |
| Post subject: | Re: Loading Up.. |
Me too <.<" |
|
| Page 1 of 2 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|