27.09.2012, 10:57
Quote:
I was compiling a lightly edited version of Rokzlive's Trucking Gamemode and recieved these errors:
Код:
C:\Users\keleyj\Desktop\SAMP SERVER\Server (Real)\gamemodes\public.pwn(357) : error 012: invalid function call, not a valid address C:\Users\keleyj\Desktop\SAMP SERVER\Server (Real)\gamemodes\public.pwn(357) : error 001: expected token: ";", but found "sizeof" C:\Users\keleyj\Desktop\SAMP SERVER\Server (Real)\gamemodes\public.pwn(357) : warning 215: expression has no effect C:\Users\keleyj\Desktop\SAMP SERVER\Server (Real)\gamemodes\public.pwn(357) : error 001: expected token: ";", but found ")" C:\Users\keleyj\Desktop\SAMP SERVER\Server (Real)\gamemodes\public.pwn(357) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors. Код:
new rand = rand(sizeof(TruckingMissionRandom)); Код:
if(!strcmp("/work", cmdtext, true)) { new pvehiclemodel = GetVehicleModel(GetPlayerVehicleID(playerid)); if (pvehiclemodel == 403 || pvehiclemodel == 514 || pvehiclemodel == 515) { new string[200]; new rand = rand(sizeof(TruckingMissionRandom)); CreatePlayerMission(playerid, TruckingMissionRandom[rand][UseTrailerCheck], TruckingMissionRandom[rand][MissionPay], TruckingMissionRandom[rand][loadx],TruckingMissionRandom[rand][loady], TruckingMissionRandom[rand][loadz], TruckingMissionRandom[rand][unloadx],TruckingMissionRandom[rand][unloady], TruckingMissionRandom[rand][unloadz]); format(string, sizeof(string), "You are doing mission: %s", TruckingMissionRandom[rand][MissionName]); SendClientMessage(playerid, 0x00FF00FF, string); } else Also, could someone make a topic with the most common error codes, what they mean and how to fix them? Alot of people like myself would benefit from this. Thanks |
pawn Код:
if(!strcmp("/work", cmdtext, true))
{
new pvehiclemodel = GetVehicleModel(GetPlayerVehicleID(playerid));
if (pvehiclemodel == 403 || pvehiclemodel == 514 || pvehiclemodel == 515)
{
new Rand = rand(sizeof(TruckingMissionRandom));
CreatePlayerMission(playerid, TruckingMissionRandom[Rand][UseTrailerCheck], TruckingMissionRandom[Rand][MissionPay], TruckingMissionRandom[Rand][loadx],TruckingMissionRandom[Rand][loady], TruckingMissionRandom[Rand][loadz], TruckingMissionRandom[Rand][unloadx],TruckingMissionRandom[Rand][unloady], TruckingMissionRandom[Rand][unloadz]);
new string[128];
format(string, sizeof(string), "You are doing mission: %s", TruckingMissionRandom[rand][MissionName]);
SendClientMessage(playerid, 0x00FF00FF, string);
}
else