Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: Gito Baloch on Feb 14, 2020, 04:59 PM

Title: Getting error in Spawnwep command
Post by: Gito Baloch on Feb 14, 2020, 04:59 PM
Hey! I am getting error in MacTavish's Spawnwep system i've copied it correctly but the problem is in the script.
The Error is

AN ERROR HAS OCCURED [the index 'Reg' does not exist]

AN ERROR HAS OCCURED [the index 'Reg' does not exist]

CALLSTACK
*FUNCTION [onPlayerRequestSpawn()] scripts/main.nut line [1365]

AND THE 1365th line is

 if (!stats[ player.ID ].Reg) MessagePlayer("[#00CC00]** Please Register First.", player);[/][/1365][/the][/the]


tell me the solution please......

[the index 'Reg' does not exist][the index 'Reg' does not exist][1365][ player.ID ]



[the index 'Reg' does not exist][the index 'Reg' does not exist][1365]
Title: Re: Getting error in Spawnwep command
Post by: habi on Feb 15, 2020, 02:25 PM
hi friend, do not duplicate lines.

i searched that topic (spawnwep) and do not find this line -> onPlayerRequestSpawn.

so the problem is not with spawnwep system, but with some other thing. did you added admin cmd or something?.
Title: Re: Getting error in Spawnwep command
Post by: Gito Baloch on Feb 15, 2020, 06:16 PM
Yes Brother,  i've added admin system.
Title: Re: Getting error in Spawnwep command
Post by: habi on Feb 16, 2020, 02:13 PM
did you forgot to add stats[ player.ID ] = PlayerClass(); in onPlayerJoin
Title: Re: Getting error in Spawnwep command
Post by: NicusorN5 on Feb 16, 2020, 08:07 PM
Also the class contained in stats[player.ID] might require the member Reg. Won't take a look at MacTavish's system tho.
Title: Re: Getting error in Spawnwep command
Post by: Gito Baloch on Feb 20, 2020, 05:00 PM
Solved - Helped by AlecuMadalin32

Locked.