Author Topic: Fixing NickRegistration  (Read 1125 times)

0 Members and 1 Guest are viewing this topic.

Offline Mercury92

  • Camper
  • ***
  • Posts: 284
Fixing NickRegistration
« on: April 18, 2010, 03:34:48 pm »
Need help to fix some errors. Spkka is too busy right now.
Using 2.6.5 core.

Code: [Select]
NickRegistration -> (AppOnIdle): Invalid Type
NickRegistration -> (OnPlayerSpeak): Out of Global Vars range
NickRegistration -> (OnJoinTeam): Invalid Type
NickRegistration -> (AppOnIdle): Type Mismatch
NickRegistration -> (OnPlayerSpeak): Invalid Opcode Parameter
Quote
http://forums.soldat.pl/index.php?topic=23470.0

see attachment
[saw]  on 1.5.1

DarkCrusade

  • Guest
Re: Fixing NickRegistration
« Reply #1 on: April 19, 2010, 08:39:45 am »
First of all: Why do you use MAXPLAYERS instead of just 32?
One AppOnIdle error is caused by the variables GOOD and BAD. Replace longint with $00FF00 (bad) and $FF0000.

Offline dnmr

  • Camper
  • ***
  • Posts: 315
  • emotionally handicapped
Re: Fixing NickRegistration
« Reply #2 on: April 19, 2010, 09:20:55 am »
First of all: Why do you use MAXPLAYERS instead of just 32?
using constants is actually considered a good practice from what i've heard >.< Although a better solution would be to use a dynamic MaxID var

One AppOnIdle error is caused by the variables GOOD and BAD. Replace longint with $00FF00 (bad) and $FF0000.
do you truly believe your sole purpose here is to misguide people? Because it surely seems so. If there would be a wrong variable type declared in the script, the server would point that out when it is starting. This neat stream of errors here is actually quite common if you don't follow some of the rules of safe scripting for scriptcore.
First of all, always compare your getplayerstat's that return boolean results with true/false. Don't just leave getPlayerStat( ID, 'Active' ) hanging there like that. Secondly, dynamic arrays tend to mess things up. There are also some other issues, but i dont think anything related is present in this script