Wrong numb of params but its right!

Started by Kewun, Sep 15, 2016, 02:50 PM

Previous topic - Next topic

Kewun

Im trying to make a hint system

function Hints() {
local id = random(hints);        <-         ERROR! Wrong nubmer of parameterz
Message(hint[0][id]);
Message(hint[1][id]);
}
function random(max) {
  local random = rand();
  random = random - (random/max)*max;
  return random;
}

why ? :/

here is the local hint

hints <- 11;
local hint = [
["[#ffffff]Need help? ask any players or administrators, or use /help command",
"[#ffffff]You can work as police",
"[#ffffff]To give someone cash, type /givecash player amount",
"[#ffffff]You can work as medic",
"[#ffffff]You can get commands list by typing /cmds",
"[#ffffff]You can visit a cheap vehicle shop, find it in red vehicle marker on radar",
"[#ffffff]You can buy clothes, theres a tshirt marker on radar, theres clothes shop",
"[#ffffff]You can read rules of server by typing /rules",
"[#ffffff]You can visit our server forums, www.vcrp.tk",
"[#ffffff]Made by KewuN, TheRouke",
"[#ffffff]If you find a bug, cheater, you can report in forums www.vcrp.tk",
"[#ffffff]You can see bindkeys list by typing /binds",]
];

DizzasTeR

Check for double functions with similar names

Kewun

ah, you right, i had like 5 random functions... ( blindest man in the world )