23.09.2011, 17:09
I have these errors:
(226) : error 021: symbol already defined: "OnPlayerCommandText"
(396) : error 055: start of function body without function header
(39 : error 010: invalid function or declaration
And this is the script
The other 2 errors
(226) : error 021: symbol already defined: "OnPlayerCommandText"
(396) : error 055: start of function body without function header
(39 : error 010: invalid function or declaration
And this is the script
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { // Line 226 !! ERROR 1 if (strcmp("/open", cmdtext, true, 5) == 0) { if(IsPlayerInRangeOfPoint(playerid, 25, 1360.0083, -842.9781,45.8299)) { MoveObject(gate1, 1352.1815185547,-844.67443847656, 46.521034240723, 5000); SendClientMessage(playerid, 0xEF994300, "The gate has opened."); } return 1; } if (strcmp("/close", cmdtext, true, 6) == 0) { if(IsPlayerInRangeOfPoint(playerid, 25, 1360.0083, -842.9781,45.8299)) { MoveObject(gate1, 1356.8719482422, -837.70202636719, 46.521034240723, 5000); SendClientMessage(playerid, 0xEF994300, "The gate has closed."); }//closing bracket return 1; } return 0; }
Код:
{ // 2nd error gate1 = CreateObject(969, 1356.8719482422, -837.70202636719, 46.521034240723, 0, 0, 246, 5) //Creating the object return 1; //3rd error }