AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Little compiling error (https://forums.alliedmods.net/showthread.php?t=26134)

SlimDog 03-27-2006 12:17

Little compiling error
 
Code:
/////////////////////////////////////////////////////////////////// // Fun Predictions 1.0 by SlimDog                                // // Description: It will show some fun predictinions in every new // // round:)                                                       // //                                                               // // Admin commands                                                // // amx_prediction (ADMIN_LEVEL_H) - if turned on, turns off; if  // // turned off, turns on fun predictions.                         // ////////////////////////Don't edit below/////////////////////////// #include <amxmodx> #include <amxmisc> #define PLUGIN "Fun Predictions" #define VERSION "1.0" #define AUTHOR "SlimDog" //////////////////////////////////////////////////////// // You can change Fun Predictions default status here // // 1 - on by default, 0 - off by default              // ///////////////////You can edit here//////////////////// new predstat = 1 // Don't edit below if you don't realy know what you are doing public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_event("RoundTime", "predict", "bc")     register_concmd("amx_prediction", "prstatus", ADMIN_LEVEL_H) } public prstatus(id) {     if (predstat == 1) {         predstat = 0         console_print(id, "[!] You have turned off FUN Predictions. So now it's not active.")     }     else {         predstat = 1         console_print(id, "[!] You have turned on FUN Predictions. So now it's active.")     }     return PLUGIN_CONTINUE } public predict() {     new players[32], num;     get_players(players, num, "a");     if ((predstat == 1) && (num > 1)) {         new cfg[256]         get_configsdir(cfg[255], 255)         format(cfg, 255, "%s/predictions.txt")         if(!file_exists(cfg))         {             client_print(0, print_chat, "[!Warning!] Fun Predictions can't work without %s. Please check if that file exists.",cfg)             return PLUGIN_HANDLED;         }         new krcid         while(!is_user_alive(krcid))             krcid = random_num(1,get_playersnum())         new veikejas[33]         get_user_name(krcid,veikejas,32)         new lntx[101], predtag[31], message[127], ilgis, ilgiss;         read_file(cfg, random_num(9,file_size(cfg,1)), lntx, 100, ilgis)         read_file(cfg, 7, predtag, 30, ilgiss)         format(message ,"%s %s",predtag,lntx);         client_print(0, print_chat, "%s",message)     }     return PLUGIN_CONTINUE }

Code:

//// pred_mod.sma
// C:\Sierra\Counter-Strike\cstrike\addons\amxmodx\scripting\pred_mod.sma(69) :
error 035: argument type mismatch (argument 2)
//
// 1 Error.
// Could not locate output file compiled\pred_mod.amx (compile failed).
//
// Compilation Time: 0.19 sec
// ----------------------------------------

I can't fix it, so maybe someone could help me...

Timoses 03-27-2006 12:18

What is the error?

SlimDog 03-27-2006 12:20

Quote:

Originally Posted by Timoses
What is the error?

Added to first post.

Timoses 03-27-2006 12:25

Code:
        format(message ,"%s %s",predtag,lntx);
it says
(argument 2)

it should be a lenght.
Don't know anything else :D

<---- "Amxx Downloader" o.o
I'm learning...

SlimDog 03-27-2006 12:30

Quote:

Originally Posted by Timoses
Code:
        format(message ,"%s %s",predtag,lntx);
it says
(argument 2)

it should be a lenght.
Don't know anything else :D

<---- "Amxx Downloader" o.o
I'm learning...

Damn I'm so stupid:D Thanks... Problem solved.


All times are GMT -4. The time now is 16:31.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.