Getting error in Spawnwep command

Started by Gito Baloch, Feb 14, 2020, 04:59 PM

Previous topic - Next topic

Gito Baloch

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]
Programming is the language I speak, the world I shape, and the future I code

habi

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?.

Gito Baloch

Yes Brother,  i've added admin system.
Programming is the language I speak, the world I shape, and the future I code

habi

did you forgot to add stats[ player.ID ] = PlayerClass(); in onPlayerJoin

NicusorN5

Also the class contained in stats[player.ID] might require the member Reg. Won't take a look at MacTavish's system tho.

Gito Baloch

Solved - Helped by AlecuMadalin32

Locked.
Programming is the language I speak, the world I shape, and the future I code