Problem with my Gamemode. I need help. Please
#1

Hello. My gamemode has about 13000 lines. Since it grow up bigger and bigger something seems to be wrong.
The problem is that some public functions doesnt work or they only work for the first lines.

for example this:

forward SellCar(playerid);
public SellCar(playerid)
{
DestroyCar(GetVehicleID(playerid)); <<<< This Point works
... <<< This Point works too
... <<< This Point works too
... <<< This Point works too
... <<< This Point works too
GivePlayerMoney(playerid,10000); <<< this point and everything under this line doesnt work.
... <<< doesnt work too.
}

Does public function has a line limit or something like this?
What else could be wrong in my gamemode?
Could be this the porblem?

Header size: 9256 bytes
Code size: 722764 bytes
Data size: 2508820 bytes
Stack/heap size: 16384 bytes; estimated max. usage=4315 cells (17260 bytes)
Total requirements: 3257224 bytes

Please help me and sorry for my bad english. Thx
Reply
#2

I had this problem too when i added a command incorrectly.
Reply
#3

How can I find out which command?

What was wrong with your command? Maybe i have the same problem, can you give more details pls?
Reply
#4

It was two months ago i dont remember. You should make a copy of your GM and try to delete the commands that you have previuosly added.
Reply
#5

OK. I deleted all commands but the problem is still there.
This is the part that doesnt execute all lines:

Код:
if(checkpointid == OttoDestroy)
	{
		if(BuyingInProgress == 1) { return SendClientMessage(playerid,rot,"[OTTO]: Please wait a moment. There is another customer now!"); }
		if(IsPlayerInAnyVehicle(playerid)) { return SendClientMessage(playerid,rot,"[OTTO]: Park the car outside and come back!"); }
		if(PlayerInfo[playerid][cid] == 0) { return SendClientMessage(playerid,rot,"[OTTO]: You don't have a Car to sell it here!"); }
        SetTimer("ResetBuyingInProgress",6000,0);
		BuyingInProgress = 1;
		if(PlayerInfo[playerid][cid] != vcreated)
		{
 			for(new i=0;i<vcreated;i++)
			{
				if(nextfreeid[i] == 0)
				{
					nextfreeid[i] = PlayerInfo[playerid][cid];
					break;
				}
			}
		}
		if(PlayerInfo[playerid][cid] == vcreated)
		{
		    vcreated--;
		}
 		new bname[MAX_PLAYER_NAME];
		GetPlayerName(playerid,bname,sizeof(bname));
		format(irc,sizeof(irc),"14[CAR-SYSTEM] Successfully unregistered %s's %s on Slot %d!",bname,aVehicleNames[PlayerInfo[playerid][cmodel]],PlayerInfo[playerid][cid]);
 		IRC_Say(gBotID[0],IRC_CHANNEL,irc);
		DestroyVehicle(PlayerInfo[playerid][cid]);
		PlayerInfo[playerid][cid] = 0;
		PlayerInfo[playerid][cmodel] = 0;
		PlayerInfo[playerid][cposx] = 0;
		PlayerInfo[playerid][cposy] = 0;
		PlayerInfo[playerid][cposz] = 0;
		PlayerInfo[playerid][cposa] = 0;
		PlayerInfo[playerid][ccolor1] = 0;
		PlayerInfo[playerid][ccolor2] = 0;
		PlayerInfo[playerid][cpaintjob] = -1;
		PlayerInfo[playerid][cmod1] = 0;
		PlayerInfo[playerid][cmod2] = 0;
		PlayerInfo[playerid][cmod3] = 0;
		PlayerInfo[playerid][cmod4] = 0;
		PlayerInfo[playerid][cmod5] = 0;
		PlayerInfo[playerid][cmod6] = 0;
		PlayerInfo[playerid][cmod7] = 0;
		PlayerInfo[playerid][cmod8] = 0;
		PlayerInfo[playerid][cmod9] = 0;
		PlayerInfo[playerid][cmod10] = 0;
		PlayerInfo[playerid][cmod11] = 0;
		PlayerInfo[playerid][cmod12] = 0;
		PlayerInfo[playerid][cmod13] = 0;
		PlayerInfo[playerid][cmod14] = 0;
		PlayerInfo[playerid][crespawn] = 0;
		PlayerInfo[playerid][cdeathx] = 0;
		PlayerInfo[playerid][cdeathy] = 0;
		PlayerInfo[playerid][cdeathz] = 0;
		GivePlayerMoney(playerid,10000);
		SendClientMessage(playerid,gruen,"[OTTO]: You have sold your car. Payment: 10000. Thank You!");
		format(msg,sizeof(msg),"%s has sold his/her Car at Otto!",bname);
        SendClientMessageToAll(gruen,msg);
		return 1;
	}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)