[H3LP] Argument type | formatex chat random
Hi! :wink:
What is the problem? Error message: Error: Argument type mismatch (argument 1) How do i fix it? PHP Code:
|
Re: [H3LP] Argument type | formatex chat random
random("") is your problem.
random expects a number, not a string. Input a number and it will return a random number between 0 and the number - 1. random(10) will give random between 0 to 9. |
Re: [H3LP] Argument type | formatex chat random
Also use charsmax(chat) instead of typing the max length manually.
|
Re: [H3LP] Argument type | formatex chat random
Quote:
Quote:
_____________________________________________ ____________________ EDIT: Okay, I just tried: PHP Code:
Error: Expected token: ",", but found "[" on line *** Error: Expected token: ";", but found "]" on line 762 But, this is work fine: Why? PHP Code:
|
Re: [H3LP] Argument type | formatex chat random
Quote:
PHP Code:
PHP Code:
Quote:
Quote:
I'd still suggest posting the full code if you want to help us help you solve the issue. |
Re: [H3LP] Argument type | formatex chat random
You need to provide more code for us to fully help you. You may not need to use formatex() at all--without providing your string arrays we cannot tell what the purpose of formatex() is. Also, if you plan to print these to chat, client_print() includes its own formatting so formatex() would not be needed. If you do not need to format the chat message, just print the messages directly from the chat array and remove the szChat[] variable.
PHP Code:
|
Re: [H3LP] Argument type | formatex chat random
Hi!
I'm sorry to write you so late, I worked. Okay, now not work: PHP Code:
PHP Code:
|
All times are GMT -4. The time now is 06:26. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.