• ✨ ARCHIVE MODE ✨
    The forum has now been set to read-only mode, no new posts, resources, replies etc will not be possible.
    We recommend you join our Discord server to get real-time response: Discord Invite Link

Difficulty with a script

Status
Not open for further replies.

Darkfire

Administrator
Administrator
P3D Developer
I am scripting a scene for my mod
I get this when ever i turn towards the script block
here is the scriptblock
Code:
{"Entity"{ENT[{"EntityID"{str[ScriptBlock]}}{"Position"{sngArr[24,0,8]}}{"TexturePath"{str[Center]}}{"Textures"{recArr[[0,48,16,16]]}}{"TextureIndex"{intArr[0,0]}}{"Collision"{bool[0]}}{"ModelID"{int[0]}}{"Action"{int[0]}}{"AdditionalValue"{str[goldenrod_rival_encounter]}}{"Rotation"{int[0]}}]}}
this is the script
Code:
:if:not register(plainbadge_obtain)
:then
:end
:endif
 
:if:register(plainbadge_obtain)
:then
:if:register(rival_encounter_goldenrod)
:then
:end
:endif
:if:not register(rival_encounter_goldenrod)
:then
@Text: WAIT!!
@Warp:8,9,0,15
@Warp:10,8,0,17
@Turn:10,4
@Warp:1,8,0,19
@Turn:1,4
@Warp:2,12,0,15
@Turn:2,1
@Warp:3,12,0,16
@Turn:3,1
@Warp:4,10,0,19
@Turn:4,4
@Warp:5,9,0,19
@Turn:5,4
@Warp:6,11,0,19
@Turn:6,4
@Warp:7,12,0,18
@Turn:7,1
@Music:johto_rival_appear
@Warp:Player,12,0,17
@Turn:Player,3
@Text:You guys are~in Team Rocket!~What are you~doing Here!?*Murmer*uh...~We're just~...uh...~tourists*Yeah! Tourists!*Murmer*Then why are~you wearing those~uniforms!?*We-er-bought them~at a um...~*Thrift Store!~We got them at~a thrift store!!*LIARS!!~GO SNEASEL!!
@Warp:12,8,0,16
@Move:12,1
@Warp:9,43,0,13
@Warp:13,8,0,15
@Warp:12,8,0,16
@Warp:12,9,0,16
@Move:12,1
@Warp:8,43,0,13
@Warp:14,9,0,15
@Warp:12,9,0,16
@Warp:11,14,0,16
@Turn:11,1
@Text:STOP THIS INSTANT
@Turn:Player,2
@Turn:10,3
@Turn:3,1
@Move:3,1
@Turn:3,4
@Move:3,1
@Turn:3,2
@Move:11,3
@Turn:Player,2
@Text:But th-*No Buts~Wearing that~uniform is not~a crime.~
@Text:Grrr
@Warp:12,43,0,11
@Turn:Player,2
@Move:Player,1
@Turn:Player,3
@Move:Player,1
@Turn:Player,2
@Move:10,10
@Move:Player,1
@Turn:Player,3
@Move:Player,1
@Text:Thanks Officer!
@Text:Its a good thing~we have another~Unif-set of clothes~at the hotel*Just remember~to behave
@Text:Yes Sir!!
@Warp:1,20,0,26
@Warp:2,19,0,16
@Warp:3,11,0,27
@Warp:4,7,0,18
@Warp:5,12,0,16
@Warp:6,17,0,10
@Warp:7,30,0,17
@Warp:8,4,0,16
@Warp:9,8,0,15
@Warp:10,34,0,16
@Warp:11,43,0,13
@Warp:13,43,0,12
@Warp:14,43,0,14
@Register:rival_encounter_goldenrod
@Music:Goldenrod
:end
:endif
:end
:endif
this is the crash report
Pokémon 3D has crashed!
---------------------------

System specifications:
Pokémon 3D version: 0.25
Operating system: Microsoft Windows 7 Home Premium [6.1.7601.65536]
Decimal seperator: .
---------------------------

Here is further information:
Message: The rectangle is too large or too small for this resource.
Parameter name: rect
InnerException: NOTHING
Source: Microsoft.Xna.Framework.Graphics
StackTrace: at Microsoft.Xna.Framework.Graphics.Texture.GetAndValidateRect(_D3DSURFACE_DESC* __unnamed000, UInt32* pdwLockWidth, UInt32* pdwLockHeight, Nullable`1 rect)
at Microsoft.Xna.Framework.Graphics.Texture2D.CopyData[T](Int32 level, Nullable`1 rect, T[] data, Int32 startIndex, Int32 elementCount, UInt32 options, Boolean isSetting)
at Microsoft.Xna.Framework.Graphics.Texture2D.GetData[T](Int32 level, Nullable`1 rect, T[] data, Int32 startIndex, Int32 elementCount)
at _2._5DHero.Textures.TextureRectangle(Texture2D Texture, Rectangle Rectangle)
at _2._5DHero.NPC.ChangeTexture()
at _2._5DHero.NPC..ctor(Single X, Single Y, Single Z, Texture2D[] Textures, String TextureID, Int32 Rotation, Int32 ActionValue, String AdditionalValue, Vector3 Scale, String Name, Int32 ID, String Movement, List`1 MoveRectangles, Vector3 Shader)
at _2._5DHero.LevelLoader.AddNPC(Dictionary`2 Tags)
at _2._5DHero.LevelLoader.LoadLevel(String levelPath, Boolean loadOffsetMap, Vector2 offset)
at _2._5DHero.Level.Warp()
at _2._5DHero.Level.Update()
at _2._5DHero_OverworldScreen.Update()
at _2._5DHero.Basic.Update(GameTime gameTime)
at _2._5DHero.DGame.Update(GameTime gameTime)
at Microsoft.Xna.Framework.Game.Tick()
at Microsoft.Xna.Framework.Game.HostIdle(Object sender, EventArgs e)
at Microsoft.Xna.Framework.GameHost.OnIdle()
at Microsoft.Xna.Framework.WindowsGameHost.RunOneFrame()
at Microsoft.Xna.Framework.WindowsGameHost.ApplicationIdle(Object sender, EventArgs e)
at System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at Microsoft.Xna.Framework.WindowsGameHost.Run()
at Microsoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun)
at Microsoft.Xna.Framework.Game.Run()
at _2._5DHero.Program.Main(String[] args)

You should report this error.

Go to "http://www.pokemon3d.net/forum/" to report the error in the bugs section.

any ideas what is wrong?
 

Splint

Champion
Have u tried running it with a basic script? (doubt it causes the problem)

Since it is a texture issue am guessing
Code:
{"Textures"{recArr[[0,48,16,16]]}}
could possibly be the culprit.

Not sure if script blocks even need a texture assigned
 

Darkfire

Administrator
Administrator
P3D Developer
i changed the texture to something that had to be there but it still crashed
also i copied the basic layout from another map so...?
 

Splint

Champion
If u remove the script block and turn that direction it works fine?
As in it doesn't crash your game
 

Darkfire

Administrator
Administrator
P3D Developer
and now it won't load route 34......
something with the offset map
Pokémon 3D has crashed!
---------------------------

System specifications:
Pokémon 3D version: 0.25
Operating system: Microsoft Windows 7 Home Premium [6.1.7601.65536]
Decimal seperator: .
---------------------------

Here is further information:
Message: Conversion from string "" to type 'Integer' is not valid.
InnerException: Input string was not in a correct format.
Source: Microsoft.VisualBasic
StackTrace: at Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(String Value)
at _2._5DHero.LevelLoader.ProcessTag(Dictionary`2& Dictionary, String Tag)
at _2._5DHero.LevelLoader.LoadLevel(String levelPath, Boolean loadOffsetMap, Vector2 offset)
at _2._5DHero.LevelLoader.AddOffsetMap(Dictionary`2 Tags)
at _2._5DHero.LevelLoader.LoadLevel(String levelPath, Boolean loadOffsetMap, Vector2 offset)
at _2._5DHero.Level.Load(String Levelpath)
at _2._5DHero_OverworldScreen..ctor()
at _2._5DHero.MainMenuScreen.UpdateLoadMenu()
at _2._5DHero.MainMenuScreen.Update()
at _2._5DHero.Basic.Update(GameTime gameTime)
at _2._5DHero.DGame.Update(GameTime gameTime)
at Microsoft.Xna.Framework.Game.Tick()
at Microsoft.Xna.Framework.Game.HostIdle(Object sender, EventArgs e)
at Microsoft.Xna.Framework.GameHost.OnIdle()
at Microsoft.Xna.Framework.WindowsGameHost.RunOneFrame()
at Microsoft.Xna.Framework.WindowsGameHost.ApplicationIdle(Object sender, EventArgs e)
at System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at Microsoft.Xna.Framework.WindowsGameHost.Run()
at Microsoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun)
at Microsoft.Xna.Framework.Game.Run()
at _2._5DHero.Program.Main(String[] args)

You should report this error.

Go to "http://www.pokemon3d.net/forum/" to report the error in the bugs section.
 

Splint

Champion
Message: Conversion from string "" to type 'Integer' is not valid.
Means inside the str part of your offset map is a number of some sort

What does the line of your offset look like, mine looks like this

Route1:
Code:
{"OffsetMap"{MAP[{"Offset"{intArr[-2,39]}}{"Map"{str[kanto\pallettown.dat]}}]}}
{"OffsetMap"{MAP[{"Offset"{intArr[-14,-45]}}{"Map"{str[kanto\viridiancity.dat]}}]}}
 

Darkfire

Administrator
Administrator
P3D Developer
I don't know whats wrong in any of that
I am going to replace the goldenrod i am using with the original
and the put the 6 lines of code i am using back in
Code:
{"NPC"{NPC[{"Position"{sngArr[43,0,15]}}{"TextureID"{str[4]}}{"ID"{int[10]}}{"Name"{str[random]}}{"Action"{int[0]}}{"AdditionalValue"{str[]}}{"Rotation"{int[1]}}{"Movement"{str[Walk]}}{"MoveRectangles"{recArr[[18,26,4,2]]}}]}}
{"NPC"{NPC[{"TextureID"{str[25]}}{"ID"{int[11]}}{"Name"{str[random]}}{"Action"{int[0]}}{"AdditionalValue"{str[]}}{"Rotation"{int[1]}}{"Movement"{str[Walk]}}{"MoveRectangles"{recArr[[18,26,4,2]]}}{"Position"{sngArr[43,0,14]}}]}}
{"NPC"{NPC[{"TextureID"{str[Sneasel]}}{"ID"{int[12]}}{"Name"{str[random]}}{"Action"{int[0]}}{"AdditionalValue"{str[]}}{"Rotation"{int[4]}}{"Movement"{str[Walk]}}{"MoveRectangles"{recArr[[18,26,4,2]]}}{"Position"{sngArr[43,0,10]}}]}}
{"NPC"{NPC[{"TextureID"{str[GruntM]}}{"ID"{int[13]}}{"Name"{str[random]}}{"Action"{int[0]}}{"AdditionalValue"{str[]}}{"Rotation"{int[2]}}{"Movement"{str[Walk]}}{"MoveRectangles"{recArr[[18,26,4,2]]}}{"Position"{sngArr[43,0,11]}}]}}
{"NPC"{NPC[{"TextureID"{str[GruntM]}}{"ID"{int[14]}}{"Name"{str[random]}}{"Action"{int[0]}}{"AdditionalValue"{str[]}}{"Rotation"{int[2]}}{"Movement"{str[Walk]}}{"MoveRectangles"{recArr[[18,26,4,2]]}}{"Position"{sngArr[43,0,12]}}]}}
{"Entity"{ENT[{"EntityID"{str[ScriptBlock]}}{"Position"{sngArr[24,0,8]}}{"TexturePath"{str[Center]}}{"Textures"{recArr[[0,,16,16]]}}{"TextureIndex"{intArr[0,0]}}{"Collision"{bool[0]}}{"ModelID"{int[0]}}{"Action"{int[0]}}{"AdditionalValue"{str[goldenrod_rival_encounter]}}{"Rotation"{int[0]}}]}}
this is what i am inserting is there any issue with it?
 

Darkfire

Administrator
Administrator
P3D Developer
there is something wrong in there somewhere
i am going to test each line til i can find which one does it....
the map works if i don't have those six lines in
 

Splint

Champion
Code:
{"NPC"{NPC[{"TextureID"{str[25]}}{"ID"{int[11]}}{"Name"{str[random]}}{"Action"{int[0]}}{"AdditionalValue"{str[]}}{"Rotation"{int[1]}}{"Movement"{str[Walk]}}{"MoveRectangles"{recArr[[18,26,4,2]]}}{"Position"{sngArr[43,0,14]}}]}}
Code:
{str[25]}
Where is that code from? Did u put that together? try removing the entire line
 

Darkfire

Administrator
Administrator
P3D Developer
that guy works fine
just figured out that it is the line for sneasel and the line for the script block that crash the game

that line makes the police dude
 

Darkfire

Administrator
Administrator
P3D Developer
yep checked it many times now
and i have unformatted it and it is the right size and everything
 

Splint

Champion
Just a observation but the rotation saids [4] for sneasel vs [2] for GruntM have u tried changing it to 2?
 
Status
Not open for further replies.
Top