05.11.2014, 00:40
Код:
stock UsageMessage(id, commands[], param[]) { new string[256]; new par0[10]; new par1[10]; new par2[10]; new par3[10]; new par4[10]; new par5[10]; new par6[10]; new par7[10]; new par8[10]; new par9[10]; sscanf(param, "s[10]s[10]s[10]s[10]s[10]s[10]s[10]s[10]s[10]s[10]", par0, par1, par2, par3, par4, par5, par6, par7, par8, par9); format(string, sizeof(string), "[USAGE]: /%s '", commands); if(strlen(par0) != 0) { format(par0, sizeof(par0), "<%s>", par0); strins(string, par0, strlen(string)); } if(strlen(par1) != 0) { format(par1, sizeof(par1), "<%s>", par1); strins(string, par1, strlen(string)+1); } if(strlen(par2) != 0) { format(par2, sizeof(par2), "<%s>", par2); strins(string, par2, strlen(string)+1); } if(strlen(par3) != 0) { format(par3, sizeof(par3), "<%s>", par3); strins(string, par3, strlen(string)+1); } if(strlen(par4) != 0) { format(par4, sizeof(par4), "<%s>", par4); strins(string, par4, strlen(string)+1); } if(strlen(par5) != 0) { format(par5, sizeof(par5), "<%s>", par5); strins(string, par5, strlen(string)+1); } if(strlen(par6) != 0) { format(par6, sizeof(par6), "<%s>", par6); strins(string, par6, strlen(string)+1); } if(strlen(par7) != 0) { format(par7, sizeof(par7), "<%s>", par7); strins(string, par7, strlen(string)+1); } if(strlen(par8) != 0) { format(par8, sizeof(par8), "<%s>", par8); strins(string, par8, strlen(string)+1); } if(strlen(par9) != 0) { format(par9, sizeof(par9), "<%s>", par9); strins(string, par9, strlen(string)+1); } strins(string, "'", strlen(string)); SendClientMessage(id, BLUESAMP, string); return 1; }
Код:
public OnPlayerSpawn(playerid) { GivePlayerMoney(playerid, 0); UsageMessage(playerid, "sellcarto", "playerid money carkey level"); return 1; }
Код:
[08:28:19] [debug] Run time error 10: "Native function failed" [08:28:19] [debug] strins [08:28:19] [debug] AMX backtrace: [08:28:19] [debug] #0 00008a5c in ?? (0x00000000, 0x00053f74, 0x00053f9c) from vineplus.amx [08:28:19] [debug] #1 0000754c in public OnPlayerSpawn (0x00000000) from vineplus.amx