Argument type mismatch
#1

PHP код:
new unban;
cache_get_field_content(0"unban"unban); 
.
Reply
#2

Please write the error warnings in the PHP code
PHP код:
Php 
Reply
#3

Код:
new unban = cache_get_field_content_int(0, "unban");
or
Код:
new unban[sizehere];
cache_get_field_content(0, "unban", unban);
Reply
#4

Quote:
Originally Posted by JasonSchneider
Посмотреть сообщение
Please write the error warnings in the PHP code
PHP код:
Php 
It is -_-

Quote:
Originally Posted by Syzygy1
Посмотреть сообщение
Код:
new unban = cache_get_field_content_int(0, "unban");
or
Код:
new unban[sizehere];
cache_get_field_content(0, "unban", unban);
Doesn't work :/
Reply
#5

Bump!
Reply
#6

When you use cache_get_field_content it stores the data you are pulling into a STRING.

the mistake you're making is trying to store the "unban" value into a Integer which is not directly possible with this function.

You need to store the value that is given to you as a STRING and then convert it to a integer.

Код:
new result[128]; // variable which temporarily stores the value as a string7
new unban; // where we are storing our "unban" value permanently

cache_get_field_content(0, "unban", result);
unban = strval(result); // We pass the result through strval which returns our value as an integer and store.
hope this helps!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)