CMD:cc( playerid, params[ ] )
{
new ColorID, ColorID2, vehicleid, str[75];
if(sscanf(params, "dd", ColorID,ColorID2)) return SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Usage:{FFFFFF} /cc (colorid1) (colorid2)");
else if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFFFFFFAA, "{ff0000}Error: {ffffff}You are not in a vehicle!");
else if(ColorID < 0 && ColorID > 126) return SendClientMessage(playerid, 0xFF0000AA, "{FF0000}(!){CCCCCC}CarColor1 cannot be above 126 or below 0!");
else if(ColorID2 < 0 && ColorID2 > 126) return SendClientMessage(playerid, 0xFF0000AA, "{FF0000}(!){CCCCCC}CarColor2 cannot be above 126 or below 0!");
else
{
vehicleid = GetPlayerVehicleID(playerid);
ChangeVehicleColor(vehicleid, ColorID, ColorID2);
format(str, sizeof(str),"{FF0000}(!) {CCCCCC}Car Color changed.",ColorID, ColorID2);
SendClientMessage(playerid, 0x1B62E4FF, str);
}
return 1;
}
CMD:cc( playerid, params[ ] ) { new ColorID, ColorID2, vehicleid, str[75]; if(sscanf(params, "dd", ColorID,ColorID2)) return SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Usage:{FFFFFF} /cc (colorid1) (colorid2)"); else if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFFFFFFAA, "{ff0000}Error: {ffffff}You are not in a vehicle!"); else if(ColorID < 0 && ColorID > 126) return SendClientMessage(playerid, 0xFF0000AA, "{FF0000}(!){CCCCCC}CarColor1 cannot be above 126 or below 0!"); else if(ColorID2 < 0 && ColorID2 > 126) return SendClientMessage(playerid, 0xFF0000AA, "{FF0000}(!){CCCCCC}CarColor2 cannot be above 126 or below 0!"); else { vehicleid = GetPlayerVehicleID(playerid); ChangeVehicleColor(vehicleid, ColorID, ColorID2); format(str, sizeof(str),"{FF0000}(!) {CCCCCC}Car Color changed.",ColorID, ColorID2); SendClientMessage(playerid, 0x1B62E4FF, str); } return 0; }
sscanf error: System not initialised.
Well I've just noticed that on my server console I get this after entering the command:
pawn Код:
|
sscanf error: System not initialised. |
Originally Posted by sscanf's thread by ******
If you get this error, you need to make sure that you have recompiled ALL your scripts using the LATEST version of "sscanf2.inc". Older versions didn't really require this as they only had two natives - "sscanf" and "unformat", the new version has some other functions - you don't need to worry about them, but you must use "sscanf2.inc" so that they are correctly called. If you think you have done this and STILL get the error then try again - make sure you are using the correct version of PAWNO for example.
|