Posts: 384
Threads: 72
Joined: Jun 2009
Reputation:
0
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/CarHookUp", cmdtext, true, 10) == 0)
{
ChangeVehiclePaintjob(vehicleid,2);
GameTextForPlayer(playerid,"Car Hooked Up",1700, 3);
}
return 1;
}
Thats is the code but for some reason PAWNO crashes
Posts: 2,200
Threads: 14
Joined: Apr 2009
Reputation:
0
this code will not crash, it will only make a 'lose indentation' and 'undefined symbol vehicleid' error. And you should return 0; in onplayercmtext, not 1
Posts: 384
Threads: 72
Joined: Jun 2009
Reputation:
0
Now i get two errors
C:\Documents and Settings\shiraz\My Documents\My Music\pawno\HookUpCar cmd test.pwn(27) : error 010: invalid function or declaration
C:\Documents and Settings\shiraz\My Documents\My Music\pawno\HookUpCar cmd test.pwn(109) : error 017: undefined symbol "vehicleid"
C:\Documents and Settings\shiraz\My Documents\My Music\pawno\HookUpCar cmd test.pwn(113) : warning 217: loose indentation
C:\Documents and Settings\shiraz\My Documents\My Music\pawno\HookUpCar cmd test.pwn(186) : warning 203: symbol is never used: "veh"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
Posts: 384
Threads: 72
Joined: Jun 2009
Reputation:
0
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/CarHookUp", cmdtext, true, 10) == 0)
{
ChangeVehiclePaintjob(vehicleid,2);
GameTextForPlayer(playerid,"Car Hooked Up",1700, 3);
}
return 0;
}
Posts: 384
Threads: 20
Joined: Mar 2008
Reputation:
0
Indicate the line numbers. Which line is getting an error?