Strange exception

Started by Yyg, Jul 26, 2020, 03:07 AM

Previous topic - Next topic

Yyg

Hi everyone, sorry for my english

But I encountered some strange problems while writing the server, maybe someone can help me

1. After I use any CreateMarker, it will disappear without a rule when the server has a large number of people, and I have not used any DestroyMarker method. My MarkerIcon has been correctly placed in store\mapicons, and it will be displayed normally, but I don't know what Time will disappear by itself. Of course, there will be a new CreateMarker operation during this period, but there are no more than 3-5 icons in the entire world.
Supplement: I also ran DestroyMarker during the period, but the deleted marker should not disappear
such as:
status[1] = CreateMarker(...);
status[2] = CreateMarker(...);

DestroyMarker(status[2]);
//After testing, sometimes the icon that should not disappear will not be visible after executing this instruction(status[1])

2. I don't know if it is related to the first question, but sometimes, when the number of servers is large, I run a bunch of basic codes
CreatePickup( 407, 1, 0, Vector( x.tofloat(), y.tofloat(), z.tofloat() ), 255, true );
Sometimes it is not visible, but the instance is not empty. When I try to query Pickup.ID, it is a string of eight-digit long numbers. I think that although this is not empty, it is not actually generated because I can't found it or Pick up

I don't know if this is a server delay behavior or what, it's worth mentioning that my server has some more pickups and checkpoints, but none of them exceed the maximum number. Maybe there are 100 checkpoints and 1,400 pickups.

Can someone help me, I will be very grateful

Yyg

Maybe I need to add, I used store/radar in the server, custom radardisc and section00-section63, but I think these should not conflict with the mapicon problem

habi

try creating marker with world as player.World

Yyg

Thank Erveyone, the first problem solved

I found that the return value of createmarker was an increasing index, but I mistakenly thought it was an instance
So that my destroyMarker did not clear the value of the status variable

But vehicle sometimes thinks about the problem of hours, and sometimes I still encounter it

DraGone

Quote from: Yyg on Jul 26, 2020, 03:07 AM2. I don't know if it is related to the first question, but sometimes, when the number of servers is large, I run a bunch of basic codes
CreatePickup( 407, 1, 0, Vector( x.tofloat(), y.tofloat(), z.tofloat() ), 255, true );
Sometimes it is not visible, but the instance is not empty. When I try to query Pickup.ID, it is a string of eight-digit long numbers. I think that although this is not empty, it is not actually generated because I can't found it or Pick up

I don't know if this is a server delay behavior or what, it's worth mentioning that my server has some more pickups and checkpoints, but none of them exceed the maximum number. Maybe there are 100 checkpoints and 1,400 pickups.
My guess is the pickup was mistakenly deleted somewhere in your script. The ID is not supposed to be eight digit (based on pickup limit, the pickup ID should not be more than 1999), you can also confirm whether the pickup still exist in the server by using: FindPickup( pickup_var.ID ); and 'pickup_var' is the variable in which you stored the pickup. It most probably will return null..