Car Mechanic
#1

Код:
C:\Documents and Settings\Kasutaja\My Documents\San Andreas Multiplayer Server\gamemodes\sg.pwn(40124) : error 017: undefined symbol "cars"
C:\Documents and Settings\Kasutaja\My Documents\San Andreas Multiplayer Server\gamemodes\sg.pwn(40125) : error 017: undefined symbol "cars"
C:\Documents and Settings\Kasutaja\My Documents\San Andreas Multiplayer Server\gamemodes\sg.pwn(40127) : error 017: undefined symbol "h"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Errors.
Код:
	if(strcmp(cmd, "/leiaauto", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
	    if(Funktsioonmehaanikauto[playerid] == 0)
	    {
			  if(PlayerInfo[playerid][pJob] != 7)
			  {
			    SendClientMessage(playerid, COLOR_GREY, "[TЦЦ] Sa ei ole mehaanik!");
			    return 1;
			  }
				tmp = strtok(cmdtext, idx);
				if(!strlen(tmp))
				{
					SendClientMessage(playerid, COLOR_GRAD2, "[KASUTAMINE] /leiaauto [sхiduki ID]");
					return 1;
				}
				tmp = strtok(cmdtext, idx);
				cars = strval(tmp); 
				if(cars < 184 || cars > 330) { SendClientMessage(playerid, COLOR_GREY, "[FUNKTSIOON] Sхiduki ID peab olema 81 kuni 330!"); return 1; }
				//AddStaticVehicleEx(CarInfo[h][cModel],CarInfo[h][cLocationx],CarInfo[h][cLocationy],CarInfo[h][cLocationz]+1.0,CarInfo[h][cAngle],CarInfo[h][cColorOne],CarInfo[h][cColorTwo],60000);
				SetPlayerCheckpoint(playerid,CarInfo[h][cLocationx],CarInfo[h][cLocationy],CarInfo[h][cLocationz],8.0);
				SendClientMessage(playerid, COLOR_WHITE, "[MEHAANIK] Auto asukoht on mдrkitud radaril. (Punane)");
				Funktsioonmehaanikauto[playerid] = 1;
			}
			else
			{
			  SendClientMessage(playerid, COLOR_GREY, "[FUNKTSIOON] Sa oled juba teinud! Mine punase markeri juurde!");
			  return 1;
			}
		}
		return 1;
	}
(40124)
Код:
cars = strval(tmp);
This will be: If you write /leiaauto (carid) then Car ID position will be showen and Mechanic must be go that marker (Reach it)
Reply
#2

Change
pawn Код:
cars = strval(tmp);
to
pawn Код:
new cars = strval(tmp);
Change all the h-es in CarInfo to cars.
Reply
#3

Quote:
Originally Posted by Carlton
Change
pawn Код:
cars = strval(tmp);
to
pawn Код:
new cars = strval(tmp);
Change all the h-es in CarInfo to cars.
Why? OnGameModeInit there's:

Код:
	for(new h = 184; h < sizeof(CarInfo); h++)
	{
		AddStaticVehicleEx(CarInfo[h][cModel],CarInfo[h][cLocationx],CarInfo[h][cLocationy],CarInfo[h][cLocationz]+1.0,CarInfo[h][cAngle],CarInfo[h][cColorOne],CarInfo[h][cColorTwo],60000);
	}
Reply
#4

Because it's looping through all the vehicles and adding them. But in your mechanical script you're going for specific cars.
Reply
#5

Carlton, thanks.
Reply
#6

paste numbers of lines with errors
Reply
#7

Quote:
Originally Posted by rabit7
paste numbers of lines with errors
Ok, stop posting in topics you know nothing about. For the past 15 minutes, you've been posting in topics that have already been answered, or information was given that you asked for, like your blind your something. Stop trying to increase your post count.
Reply
#8

Quote:
Originally Posted by Carlton
Quote:
Originally Posted by rabit7
paste numbers of lines with errors
Ok, stop posting in topics you know nothing about. For the past 15 minutes, you've been posting in topics that have already been answered, or information was given that you asked for, like your blind your something. Stop trying to increase your post count.
Language is a barrier and I'm rarely on this forum ... lock topic ;]
Reply
#9

Now, theres 1 mistakes.

Cars 184-330 (minium <> maxium)

I type /leiaauto 280 and says it "Must be id 184 <-> 330", it doenst work.
Reply
#10

AddStaticVehicleEx or AddStaticVehicle doesnt work during the game, try CreateVehicle
Reply


Forum Jump:


Users browsing this thread: