13.04.2009, 00:16
I have a text draw that shows the current location and vehicle name but I am having some trouble:
Код:
new VehNames[212][] = { // Vehicle Names - Betamaster {"Landstalker"}, {"Bravura"}, {"Buffalo"}, {"Linerunner"}, {"Perrenial"}, {"Sentinel"}, ......more cars {"Utility Trailer"} };
Код:
forward UpdateText(vehicleid);
Код:
stock GetVehicleModelIDFromName(vehname[]) { for(new i = 0; i < 211; i++) { if (strfind(VehNames[i], vehname, true) != -1) return i + 400; } return -1; }
Код:
public UpdateText(vehicleid) { for(new i=0; i<SLOTS;i++) if(IsPlayerConnected(i)) { new NEWTEXT[256]; new curv; GetVehicleModel(curv); new car = GetVehicleModelIDFromName(vehicleid); <<<<<<Line 827 format(NEWTEXT,256, "Location: %s Vehicle: %s", GetPlayerArea(i),VehNames[GetVehicleModel(car)-400]); TextDrawSetString(Location[i], NEWTEXT); } return 1; } }
Код:
C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\Server\filterscripts\LocDisplays.pwn(827) : error 035: argument type mismatch (argument 1) Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.