alex.naoumov Geplaatst: 26 juli 2009 Rapport Geplaatst: 26 juli 2009 Hey, Ik zit hier een beetje te scripten en ik heb dit gemaakt (Met Remi's hulp): http://pastebin.com/m7a912a46 En ik krijg deze errors: ...\test.pwn(37) : error 017: undefined symbol "strtok" ...\test.pwn(37) : error 033: array must be indexed (variable "cmd") ...\test.pwn(42) : error 017: undefined symbol "strtok" ...\test.pwn(42) : error 033: array must be indexed (variable "tmp") ...\test.pwn(49) : error 079: inconsistent return types (array & non-array) ...\test.pwn(55) : error 079: inconsistent return types (array & non-array) ...\test.pwn(59) : error 017: undefined symbol "VehicleSpawned" ...\test.pwn(59) : warning 215: expression has no effect ...\test.pwn(59) : error 001: expected token: ";", but found "]" ...\test.pwn(59) : error 029: invalid expression, assumed zero ...\test.pwn(59) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 10 Errors. Heb ook geprobeert een include te maken, die werkt ook al niet: #if defined _carspawn_included #endinput #endif #define _carspawn_included #pragma library carspawn new PlayerVehicle[MAX_PLAYERS]; new bool:VehicleSpawned[MAX_PLAYERS]; native SpawnVehicle(playerid, CarID, const CarName[]); native CarSpawner(playerid,model); native CarDeleter(vehicleid); stock SpawnVehicle(playerid, CarID, const CarName[]) { new string[256]; new Float:X, Float , Float:Z, Float:R; new Interior; if(IsPlayerInAnyVehicle(playerid)) { SendClientMessage(playerid, RED, "You're already in a vehicle!"); return 1; } else { if(VehicleSpawned[playerid] == true) { DestroyVehicle(PlayerVehicle[playerid]); VehicleSpawned[playerid] = false; } VehicleSpawned[playerid] = true; GetPlayerFacingAngle(playerid,R); GetPlayerPos(playerid, X, Y, Z); Interior = GetPlayerInterior(playerid); PlayerVehicle[playerid] = CreateVehicle(CarID, X, Y, Z, R, -1, -1,60); LinkVehicleToInterior(PlayerVehicle[playerid], Interior); PutPlayerInVehicle(playerid, PlayerVehicle[playerid], 0); format(string, sizeof(string), "You've spawned a %s", CarName); SendClientMessage(playerid, YELLOW, string); return 1; } } stock CarSpawner(playerid,model) { if(IsPlayerInAnyVehicle(playerid)) SendClientMessage(playerid, red, "You already have a car!"); else { new Float:x, Float:y, Float:z, Float:angle; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, angle); if(PlayerInfo[playerid][pCar] != -1) CarDeleter(PlayerInfo[playerid][pCar]); new vehicleid=CreateVehicle(model, x, y, z, angle, -1, -1, -1); PutPlayerInVehicle(playerid, vehicleid, 0); SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid)); ChangeVehicleColor(vehicleid,0,7); PlayerInfo[playerid][pCar] = vehicleid; } return 1; } stock CarDeleter(vehicleid) { for(new i=0;i<MAX_PLAYERS;i++) { new Float:X,Float:Y,Float:Z; if(IsPlayerInVehicle(i, vehicleid)) { RemovePlayerFromVehicle(i); GetPlayerPos(i,X,Y,Z); SetPlayerPos(i,X,Y+3,Z); } SetVehicleParamsForPlayer(vehicleid,i,0,1); } SetTimerEx("VehRes",1500,0,"i",vehicleid); } Met de include crasht pwncc.exe gewoon tijdens het compileren. Wie kan mij aub helpen? Wie kan het zodanig aanpassen dat alles goed werkt, en ook mijn fouten uitlegt natuurlijk ? Alvast bedankt! Gr, Alex Reageren
Recommended Posts
Een reactie plaatsen
Je kan nu een reactie plaatsen en pas achteraf registreren. Als je al lid bent, log eerst in om met je eigen account een reactie te plaatsen.