Number of Arguments / MySQL - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Number of Arguments / MySQL (
/showthread.php?tid=580596)
Number of Arguments / MySQL -
acade - 06.07.2015
Having an issue when compiling, it's giving me two warnings about number of arguments:
Warnings:
Код:
1.2.pwn(13645) : warning 202: number of arguments does not match definition
1.2.pwn(13647) : warning 202: number of arguments does not match definition
Lines:
Код:
PlayerData[extraid][pContractReason] = cache_get_field_content(0, "ContractReason");
PlayerData[extraid][pContractedBy] = cache_get_field_content(0, "ContractedBy");
Re: Number of Arguments / MySQL -
JaydenJason - 06.07.2015
How does this pContractReason look like in the player enum structure? Does it have a size with it?
Код:
enum pInfo
pContractReason[60]
yadayadayadayada
Re: Number of Arguments / MySQL -
dusk - 06.07.2015
This is how you use cache_Get_field_content:
pawn Код:
new string[size];
cache_get_field_content(row_index, "column_name", string);
If you want to get an integer or a flow, you cache_get_field_content_int or cache_get_field_content_float:
pawn Код:
new int = cache_get_field_content_int(row_index, "column_name");
new Float:value = cache_get_field_content_Float(row_index, "column_name");
Re: Number of Arguments / MySQL -
acade - 06.07.2015

Inside my enum
Re: Number of Arguments / MySQL -
dusk - 06.07.2015
Then use
pawn Код:
cache_get_field_content(0, "ContractReason", PlayerData[extraid][pContractReason], connection_handle, 126);
cache_get_field_content(0, "ContractedBy", PlayerData[extraid][pContractedBy], connection_handle, 126);
Re: Number of Arguments / MySQL -
acade - 06.07.2015
Quote:
Originally Posted by dusk
Then use
pawn Код:
cache_get_field_content(0, "ContractReason", PlayerData[extraid][pContractReason], connection_handle, 126); cache_get_field_content(0, "ContractedBy", PlayerData[extraid][pContractedBy], connection_handle, 126);
|
Thanks, it's worked.