Need help with vehicle system
#1

Hey there! I downloaded one gamemode which has vehicle system which fully works, and gamemode has no errors. I wanted to create system for bikes, so I would have /v and /bi.
I created my variables for models etc. After that I added /buybike, menu and everything what I need to buy my bike. That works, but today, I added one more branching which will allow me to lock and unlock my bike. Now comes the weird part. This is my code:
Код:
	if(PlayerInfo[playerid][pbi])
    {
        new Float:bix, Float:biy, Float:biz;
	    GetVehiclePos(PlayerInfo[playerid][pbi], bix, biy, biz);
	    if(IsPlayerInRangeOfPoint(playerid, 3, bix, biy, biz))
	    {
	        idx;
	        idx = PlayerInfo[playerid][pbi];
	        new engine, lights, alarm, doors, bonnet, boot, objective;
			GetVehicleParamsEx(idx, engine, lights, alarm, doors, bonnet, boot, objective);
			if(doors)
			{

			    SetVehicleParamsEx(idx, engine, lights, alarm, 0, bonnet, boot, objective);
			    PlayerInfo[playerid][biLocked] = 0;
			    format(string, sizeof(string), "* %s takes out their bike keys and puts it in his bike.", RPN(playerid));
				SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
				GameTextForPlayer(playerid, "~g~Bike Unlocked", 3500, 3);
			}
			else
			{
			    SetVehicleParamsEx(idx, engine, lights, alarm, 1, bonnet, boot, objective);
			    PlayerInfo[playerid][biLocked] = 1;
			    format(string, sizeof(string), "* %s takes out his bike key and puts it in his pocket.", RPN(playerid));
				SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
				GameTextForPlayer(playerid, "~r~Bike Locked", 3500, 3);
			}
			lockdone = 1;
			return 1;
	    }
When I compile my code, I get this errors, and they all are connected with some other stuff which is declared before in my script, but now my own variables messed something up:
Код:
 error 017: undefined symbol "RPN"
 error 017: undefined symbol "SendRobberyMessage"
 error 017: undefined symbol "SendCopMessage"
 error 017: undefined symbol "IsACop"
 error 017: undefined symbol "IsACop"
 error 017: undefined symbol "GiveDodMoney"
 error 017: undefined symbol "IsPlayerLoggedIn"
 error 017: undefined symbol "ResetDodWeapons"
 error 017: undefined symbol "split"
 error 017: undefined symbol "IsPlayerLoggedIn"
 error 017: undefined symbol "RPNU"
 error 017: undefined symbol "SaveDodAmmo"
 error 017: undefined symbol "SaveToys"
 error 017: undefined symbol "RPNU"
 error 017: undefined symbol "LoadToys"
 error 017: undefined symbol "RPN"
 error 017: undefined symbol "RPN"
 error 017: undefined symbol "SendAdminMessage"
 error 017: undefined symbol "RPN"
 error 017: undefined symbol "SendAdminMessage"
 error 017: undefined symbol "RPN"
 error 017: undefined symbol "SendAdminMessage"
 error 017: undefined symbol "split"
 error 017: undefined symbol "GT"
 error 017: undefined symbol "GT"
 error 017: undefined symbol "split"
Can somebody please help me and tell me how did my variables mess up other ones.
Reply
#2

26 errors. Usually a missing bracket. Or you simply don't have those functions?
Reply
#3

I created copy of original gm, and when I compile original, it has no errors. I will try to fix my brackets then. Thanks for your reply Misiur!
Reply
#4

YEAH!
I missed one bracket, now everything works fine, I only get one warning which I will fix now. Thank you one more time. Please lock this thread.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)