.amx file suddenly 7 mb.
#1

Hello,

After I added,edited,removed some functions in my gamemode and compiled it the gamemode, it suddenly was 7 mb.
My .pwn is just 300 kb.
Maybe it has something to do with this line:
pawn Код:
new RoomOwner[MaxPickups][MAX_ROOMS][26];
// MaxPickups = 1000
// MAX_ROOMS = 206
I don't exactly know what things I added,edited,removed, so my question is:
What can be the cause that it suddenly is that size.

Thanks.

Okay I fixed it. It was the RoomOwner array.
But does somebody know how to make this array so it wont be that large? but still with 1000 pickups and 206 rooms.
Reply
#2

Well the size is not a problem for the server I host it on, But everytime I have to restart the server and upload my .amx it takes 2 minutes or something.
Also this is not a problem when I only have to upload it once in a week or something. But I'm in de middle of the delevelopment and it's very annoying to wait 2 minutes before I can test small changes.

And well it's a hotel system that sometimes have 20 floors.
Every floor has 6 rooms.
I count it like:
floor = 1
room = 3
room id = 13
floor = 20
room = 6
room id = 206
And because it is dynamic and there are more hotels I have to use maxpickups, because i store hotel,house,building data on the pickup ID.
It's working perfect, but I gues this is getting a little huge if I only have to load 10-20 hotels or less.
But I gues I have to find another way to track room owners, or just have to wait 2 minutes each upload
But thanks for your respond.
Reply
#3

Uhm, well sow how do I get the roomdata in this situation:
There is a player on floor 10.
The player is in pickupid 30.
He stands in front of roomdoor 3.
So the room number is 103.
gRoomData[103] ? gPickupRooms[30] ?
How I can see if the gRoomData[103] contains the correct data from gPickupRooms[30]?
Reply
#4

I mean, how do I check that the gRoomData[103] is not the roomdata of another pickup/hotel ?
Reply
#5

Well I used:

RoomOwner[pickupid][roomid] == (exampe) KaleOtter
but I gues you get that part

Well nevermind, I will use this and maybe if I is really needed I will try to find another way

Thanks for your time
Reply
#6

Quote:
Originally Posted by KaleOtter
Посмотреть сообщение
Well I used:

RoomOwner[pickupid][roomid] == (exampe) KaleOtter
but I gues you get that part

Well nevermind, I will use this and maybe if I is really needed I will try to find another way

Thanks for your time
With ****** methode you would do it like that

pawn Код:
gPickupRooms[pickupid] = roomid; //stores the roomid
gRoomData[roomid][ownername] = "KaleOtter"; //stores the roomdata
now we know that gPickupRooms stores the correct roomid
so if you enter the same pickupid it would print "KaleOtter"
pawn Код:
print(gRoomData[gPickupRooms[pickupid]][ownername]);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)