Forums WoW Modding Support Archives TrinityCore Discord Archives [DiscordArchive] So Shauren a buddy of mine was storing player in his script and i told him he should store playerGUI

[DiscordArchive] So Shauren a buddy of mine was storing player in his script and i told him he should store playerGUI

[DiscordArchive] So Shauren a buddy of mine was storing player in his script and i told him he should store playerGUI

Pages (3): 1 2 3 Next
rektbyfaith
Administrator
0
01-16-2024, 03:17 PM
#1
Archived author: Malcrom • Posted: 2024-01-16T15:17:11.613000+00:00
Original source

So Shauren a buddy of mine was storing player in his script and i told him he should store playerGUID. Can you tell me the proper reason so I can pass it on?
rektbyfaith
01-16-2024, 03:17 PM #1

Archived author: Malcrom • Posted: 2024-01-16T15:17:11.613000+00:00
Original source

So Shauren a buddy of mine was storing player in his script and i told him he should store playerGUID. Can you tell me the proper reason so I can pass it on?

rektbyfaith
Administrator
0
01-16-2024, 03:18 PM
#2
Archived author: Northstrider • Posted: 2024-01-16T15:18:37.488000+00:00
Original source

player can go offline and the pointer can become invalid
rektbyfaith
01-16-2024, 03:18 PM #2

Archived author: Northstrider • Posted: 2024-01-16T15:18:37.488000+00:00
Original source

player can go offline and the pointer can become invalid

rektbyfaith
Administrator
0
01-16-2024, 03:18 PM
#3
Archived author: Northstrider • Posted: 2024-01-16T15:18:44.191000+00:00
Original source

there
rektbyfaith
01-16-2024, 03:18 PM #3

Archived author: Northstrider • Posted: 2024-01-16T15:18:44.191000+00:00
Original source

there

rektbyfaith
Administrator
0
01-16-2024, 03:18 PM
#4
Archived author: ModoX • Posted: 2024-01-16T15:18:46.645000+00:00
Original source

Imagine player disconnects. The pointer is still pointing to the initial player memory, aka is now pointing to freed memory
rektbyfaith
01-16-2024, 03:18 PM #4

Archived author: ModoX • Posted: 2024-01-16T15:18:46.645000+00:00
Original source

Imagine player disconnects. The pointer is still pointing to the initial player memory, aka is now pointing to freed memory

rektbyfaith
Administrator
0
01-16-2024, 03:18 PM
#5
Archived author: Malcrom • Posted: 2024-01-16T15:18:49.538000+00:00
Original source

cool
rektbyfaith
01-16-2024, 03:18 PM #5

Archived author: Malcrom • Posted: 2024-01-16T15:18:49.538000+00:00
Original source

cool

rektbyfaith
Administrator
0
01-16-2024, 03:19 PM
#6
Archived author: Malcrom • Posted: 2024-01-16T15:19:00.128000+00:00
Original source

ty
rektbyfaith
01-16-2024, 03:19 PM #6

Archived author: Malcrom • Posted: 2024-01-16T15:19:00.128000+00:00
Original source

ty

rektbyfaith
Administrator
0
01-16-2024, 03:19 PM
#7
Archived author: Northstrider • Posted: 2024-01-16T15:19:24.659000+00:00
Original source

same goes for any object. it can disappear at any given time so storing a direct pointer to it is suicide
rektbyfaith
01-16-2024, 03:19 PM #7

Archived author: Northstrider • Posted: 2024-01-16T15:19:24.659000+00:00
Original source

same goes for any object. it can disappear at any given time so storing a direct pointer to it is suicide

rektbyfaith
Administrator
0
01-16-2024, 03:21 PM
#8
Archived author: Malcrom • Posted: 2024-01-16T15:21:34.805000+00:00
Original source

And a player check would not work?
rektbyfaith
01-16-2024, 03:21 PM #8

Archived author: Malcrom • Posted: 2024-01-16T15:21:34.805000+00:00
Original source

And a player check would not work?

rektbyfaith
Administrator
0
01-16-2024, 03:22 PM
#9
Archived author: ModoX • Posted: 2024-01-16T15:22:18.600000+00:00
Original source

if (player) only checks if player == nullptr
rektbyfaith
01-16-2024, 03:22 PM #9

Archived author: ModoX • Posted: 2024-01-16T15:22:18.600000+00:00
Original source

if (player) only checks if player == nullptr

rektbyfaith
Administrator
0
01-16-2024, 03:22 PM
#10
Archived author: Northstrider • Posted: 2024-01-16T15:22:19.273000+00:00
Original source

no, because a pointer just points to an address in memory so if that memory gets freed or used by sth else, it blows up
rektbyfaith
01-16-2024, 03:22 PM #10

Archived author: Northstrider • Posted: 2024-01-16T15:22:19.273000+00:00
Original source

no, because a pointer just points to an address in memory so if that memory gets freed or used by sth else, it blows up

Pages (3): 1 2 3 Next
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)