Jump to content
  • 0

pomoc Error pri príkazu


Arthom

Dotaz

čaute, znovu som sa vrátil k pawnu :d začal som si robiť menší mód. Spravil som si príkaz na /setadmin a /cas a ten príkaz /cas mi píše error pri druhom argumente v TextDrawSetString.

C:\Users\Asus\Downloads\samp03x_svr_R1-2_win32\gamemodes\xht.pwn(199) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase

1 Error.

no a tu je ten riadok:

199 = TextDrawSetString(Timer1, time);

a tu je ten príkaz /cas:

CMD:cas(playerid, params[]) {
new str[256], time;
if (AdminLvl[playerid] != 1) return SendClientMessage(playerid, COLOR_GREEN, "[ AdminScript ] Nemáte Admin práva!");
else if (sscanf(params, "d", time)) return SendClientMessage(playerid, COLOR_GREEN, "Použitie: /cas [ 0 - 24 ]");
else {
if (time >= 0 || time <= 24) return SendClientMessage(playerid, COLOR_GREEN, "[ AdminScript ] Nesprávny čas! [ 0 - 24 ]");
format (str, sizeof(str), "[ AdminScript ] Administrátor %s nastavil čas na %d", PlayerName(playerid), time);
 SetWorldTime(time);
TextDrawSetString(Timer1, time);
SendClientMessageToAll(COLOR_RED, str);
}
return 1;
}

vedeli by ste pomôcť?

Link to comment
Share on other sites

2 odpovědí na tuto otázku

Recommended Posts

  • 0

dík za pomoc, spravil som to takto:

CMD:cas(playerid, params[]) {
new str[256], time, casik[8];
if (AdminLvl[playerid] != 1) return SendClientMessage(playerid, COLOR_GREEN, "[ AdminScript ] Nemáte Admin práva!");
else if (sscanf(params, "d", time)) return SendClientMessage(playerid, COLOR_GREEN, "Použitie: /cas [ 0 - 24 ]");
else {
if (time < 0 || time > 23) return SendClientMessage(playerid, COLOR_GREEN, "[ AdminScript ] Nesprávny čas! [ 0 - 24 ]");
format (str, sizeof(str), "[ AdminScript ] Administrátor %s nastavil čas na %d:00", PlayerName(playerid), time);
 format(casik, sizeof(casik), "%d:00", time);
 TextDrawSetString(Timer1, casik);
 hodina = time;
 minuta = 00;
 SetWorldTime(time);
SendClientMessageToAll(COLOR_RED, str);
}
return 1;
}

a ide to v poho.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...