Author Topic: MapRandomizer - Invalid Opcode  (Read 1327 times)

0 Members and 1 Guest are viewing this topic.

Offline Polifen

  • Soldier
  • **
  • Posts: 127
MapRandomizer - Invalid Opcode
« on: July 01, 2009, 09:55:21 am »
Hello, I've got little problem, i get such errors :
Code: [Select]
(16:43:59)  [*] [Error] MapRandomizer -> (OnCommand): Out of Global Vars range
(16:43:59)  [*] [Error] MapRandomizer -> (AppOnIdle): Out of Global Vars range
(16:43:59)  [*] [Error] MapRandomizer -> (OnCommand): Invalid Opcode
(16:43:59)  [*] [Error] MapRandomizer -> (AppOnIdle): Access violation at address 080A0B43, accessing address 00000109
(16:44:00)  [*] [Error] MapRandomizer -> (AppOnIdle): Access violation at address 080A0BCC, accessing address 00000109
(16:44:01)  [*] [Error] MapRandomizer -> (AppOnIdle): Access violation at address 080A0BCC, accessing address 0000011C
(16:44:02)  [*] [Error] MapRandomizer -> (AppOnIdle): Access violation at address 080A0BCC, accessing address 0000012C
(16:44:03)  [*] [Error] MapRandomizer -> (AppOnIdle): Access violation at address 080A0BCC, accessing address 0000013C
(16:44:04)  [*] [Error] MapRandomizer -> (AppOnIdle): Access violation at address 080A0BCC, accessing address 0000014C
(16:44:05)  [*] [Error] MapRandomizer -> (AppOnIdle): Access violation at address 080A0BCC, accessing address 0000015C
(16:44:06)  [*] [Error] MapRandomizer -> (AppOnIdle): Access violation at address 080A0BCC, accessing address 0000016C

Here it was started by OnCommand, but sometimes it's OnPlayerSpeak too. First two errors don't show everytime, only the Opcode error is always same. I'm not sure but probably it's only when map is going to change using randomizer.
Anyone have an idea what can cause that?
« Last Edit: July 03, 2009, 09:35:09 am by Polifen »

Offline danmer

  • Camper
  • ***
  • Posts: 466
  • crabhead
Re: MapRandomizer - Invalid Opcode
« Reply #1 on: July 01, 2009, 12:27:24 pm »
xsplit alone can cause this on some systems, more precisely - using dynamic arrays. Where do you host the server?

Offline JFK

  • Camper
  • ***
  • Posts: 255
    • My TraxInSpace Account
Re: MapRandomizer - Invalid Opcode
« Reply #2 on: July 01, 2009, 01:46:28 pm »

The only function that uses dynamic arrays is xsplit. That function is only being called by getRandomMap, which is only called by AppOnIdle. So I don't yet see how OnCommand or OnPlayerSpeak can be the starting cause of this.

I do see you use ArrayHigh in getRandomMap. For some reason I can't remember anymore (maybe just to get not confused), I always use getArrayLenght-1 instead of that. ArrayHigh will give the number of the highest index, while getArrayLenght gives you the actual size. Since a dynamic array starts with index zero, it's highest index will always be the size-1.

Come join: EliteCTF
Listen to: My Music

Offline Polifen

  • Soldier
  • **
  • Posts: 127
Re: MapRandomizer - Invalid Opcode
« Reply #3 on: July 01, 2009, 02:27:46 pm »
Where do you host the server?

I bought an RPS( real private server, everything dedicated except discdrive ) , OS is Debian 4.0. I have 4 servers on it ( 1 climb and 3 DB server, i have that problem only on climb ). 



Thx for advice JFK, changed it.


P.S Didn't help. Any other ideas?:)

P.S2
Now i had other error, with same effect - server shutdown.

Code: [Select]
(14:19:09)  [*] [Error] MapRandomizer -> (OnPlayerSpeak): Invalid Type
(14:19:09)  [*] [Error] MapRandomizer -> (AppOnIdle): Access violation at address 080A0B43, accessing address 0000010D
(14:19:09)  [*] [Error] MapRandomizer -> (AppOnIdle): Access violation at address 080A0BCC, accessing address 0000010D
(14:19:10)  [*] [Error] MapRandomizer -> (AppOnIdle): Access violation at address 080A0BCC, accessing address 00000120
(14:19:11)  [*] [Error] MapRandomizer -> (AppOnIdle): Access violation at address 080A0BCC, accessing address 00000130
(14:19:12)  [*] [Error] MapRandomizer -> (AppOnIdle): Access violation at address 080A0BCC, accessing address 00000140
(14:19:13)  [*] [Error] MapRandomizer -> (AppOnIdle): Access violation at address 080A0BCC, accessing address 00000150
(14:19:14)  [*] [Error] MapRandomizer -> (AppOnIdle): Access violation at address 080A0BCC, accessing address 00000160
(14:19:14) [Izi] wtf
(14:19:14)  [*] [Error] MapRandomizer -> (OnPlayerSpeak): Access violation at address 080A0BCC, accessing address 00000170
(14:19:14) [PLS | HarDBroknDreaM.Cs] !vote
(14:19:15)  [*] [Error] MapRandomizer -> (OnPlayerSpeak): Access violation at address 080A0BCC, accessing address 00000180
(14:19:15)  [*] [Error] MapRandomizer -> (AppOnIdle): Access violation at address 080A0BCC, accessing address 00000190
« Last Edit: July 02, 2009, 08:06:33 am by Polifen »

Offline Polifen

  • Soldier
  • **
  • Posts: 127
Re: MapRandomizer - Invalid Opcode
« Reply #4 on: July 03, 2009, 06:16:57 am »
Sorry for double post, but editing don't bump topic, another strange error is :

Code: [Select]
(13:03:51) [KM| Polifen] gz
(13:03:52)  [*] [Error] MapRandomizer -> (OnPlayerSpeak): Out of Global Vars range

Why is it strange? It happen only after someone's cap and such text don't use global vars... I think that it's more soldatserver error than script's, but if someone have any idea I will be gratefull if you post it here :).

Offline y0uRd34th

  • Camper
  • ***
  • Posts: 325
  • [i]Look Signature![/i]
Re: MapRandomizer - Invalid Opcode
« Reply #5 on: July 03, 2009, 07:12:05 am »
Bump: Save a copy of your old post, then delete, make a new, paste the old in, make a line, write the new post :D

Offline JFK

  • Camper
  • ***
  • Posts: 255
    • My TraxInSpace Account
Re: MapRandomizer - Invalid Opcode
« Reply #6 on: July 03, 2009, 07:53:42 am »
Bump: Save a copy of your old post, then delete, make a new, paste the old in, make a line, write the new post :D
Or just use 'modify' button?
edit: oh.. to bump.. sry nvm :p

Anyway, not sure what you've changed since the first post, but now i noted this:
Code: [Select]
WriteConsole(0, 'Spectators can''t vote!', Color);

It suprises me that actually compiles? You could use the ascii replacement for ' and + to attach strings to eachother:
Code: [Select]
WriteConsole(0, 'Spectators can'+#39+'t vote!', Color);

No guarantee that solves your problem, cause I honestly have no idea :p
Oh yeah, I asume you are aware that the code you posted contains the same script twice. I'm sure you don't have that on your server since it wouldn't compile.

Oh. And I see now that in OnPlayerSpeak you have three commands that do the same thing (right?), but still use an if..then..else structure between them, you could also do this:
Code: [Select]
if (LowerCase(Text) = '!nextmap') or (LowerCase(Text) = '!ranmap') or (LowerCase(Text) = '!vote') then begin
//and just put code here once
« Last Edit: July 03, 2009, 08:08:28 am by JFK »
Come join: EliteCTF
Listen to: My Music

Offline Polifen

  • Soldier
  • **
  • Posts: 127
Re: MapRandomizer - Invalid Opcode
« Reply #7 on: July 03, 2009, 09:29:42 am »
Anyway, not sure what you've changed since the first post:

As you adviced, I changed ArrayHigh to GetArrayLength.

Code: [Select]
WriteConsole(0, 'Spectators can''t vote!', Color);

It suprises me that actually compiles? You could use the ascii replacement for ' and + to attach strings to eachother:
Code: [Select]
WriteConsole(0, 'Spectators can'+#39+'t vote!', Color);

That code is OK, '' without "+" betwen means ' in string, I have that in 90% of my scripts for about half a year and everything works fine.

Oh yeah, I asume you are aware that the code you posted contains the same script twice. I'm sure you don't have that on your server since it wouldn't compile.
I just pressed ctrl + v two times accidentally :), everything compile, otherwise it wouldn't cause errors after cap :).

Oh. And I see now that in OnPlayerSpeak you have three commands that do the same thing (right?), but still use an if..then..else structure between them, you could also do this:
Code: [Select]
if (LowerCase(Text) = '!nextmap') or (LowerCase(Text) = '!ranmap') or (LowerCase(Text) = '!vote') then begin
//and just put code here once

I thought that "or", "and" and "not" works only for boolean, I will change it.


Edit : Changed attachment in first post. www.wklej.org - if you want to see it faster :)

Edit2 : Didn't help :<.
« Last Edit: July 03, 2009, 10:37:27 am by Polifen »

Offline danmer

  • Camper
  • ***
  • Posts: 466
  • crabhead
Re: MapRandomizer - Invalid Opcode
« Reply #8 on: July 03, 2009, 11:21:29 am »
i still suggest you try running this on a different host. The cascade of errors like that usually happens on "non- scripting friendly" servers :S

Offline Polifen

  • Soldier
  • **
  • Posts: 127
Re: MapRandomizer - Invalid Opcode
« Reply #9 on: July 03, 2009, 01:23:30 pm »
Uh, I can't change server, I will try some ready script or, if that won't help i will write something less complicated. Thx for attention.