Raised This Month: $ Target: $400
 0% 

Compile error


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ProIcons
Senior Member
Join Date: Jan 2009
Location: Greece - Salonica
Old 04-24-2011 , 06:51   Compile error
Reply With Quote #1

PHP Code:
public requestip(P) {
    new 
cmd[300];
    
format(cmd,299,"IP %s",P)
    
socket_send(bothost,cmd,512)
}
/*
\
\
\
*/

        
new test get_player_id(killername); //120 Line
        
new test2 get_player_name(test); //121 Line
/*
\
\
\
*/

for( new 0iNumPlayersi++ )
{
                 
strtokbotcmdszPlayerNames], charsmaxszPlayerNames[ ] ), botcmdcharsmaxbotcmd ), ' ');
                 
player] = szPlayerNames]
                 
requestip(player[i+1],1); //585 Line
}
/*
\
\
\
*/
if (equali(arg1,"IP"))
 {
      new 
useID arg2//614
             
new useIP[32];
             
format(useIP,31,"%s",arg3)
             
format(ips[useID],31,"%s",useIP)
 }
/*
\
\
\
*/
get_player_id(p_r[]) {
   new 
get[32];
   
format(get,31,"%s",p_r);
   for ( new 
1<= iNumPlayers subsi++ )
   {
      if (
equali(player[i],get))
      {
          return 
i;
      }
   }
   return 
0;
}
/*
\
\
\
*/
get_player_name(p_i) {
   new 
num=p_i;
   if (
strlen(player[num]) > 0) {
       return 
player[num];
   }
   return 
0//640 Line

Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

Error: Argument type mismatch (argument 1) on line 120
Error: Array must be indexed (variable "-unknown-") on line 121
Error: Argument type mismatch (argument 1) on line 585
Error: Array must be indexed (variable "-unknown-") on line 614
Error: Inconsistent return types (array & non-array) on line 640
__________________
function rb return $regsubex($$1-,/(.)/g,$+($chr(2) $+ $chr(3),$r(2,15),$chr(2),\1))

Last edited by ProIcons; 04-24-2011 at 06:56.
ProIcons is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-24-2011 , 06:53   Re: Compile error
Reply With Quote #2

And we should guess lines numbers ?
Compiler gives you lines numbers where error occurs, if you don't paste the whole code, please highlight (pawn or small tag + @@ in front of line) those lines.

[Edit] Ok, you just did it

get_player_id(p_r) {
->
get_player_id(p_r[]) {
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
ProIcons
Senior Member
Join Date: Jan 2009
Location: Greece - Salonica
Old 04-24-2011 , 06:56   Re: Compile error
Reply With Quote #3

Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

Error: Array must be indexed (variable "-unknown-") on line 121
Error: Argument type mismatch (argument 1) on line 585
Error: Array must be indexed (variable "-unknown-") on line 614
Error: Inconsistent return types (array & non-array) on line 640
__________________
function rb return $regsubex($$1-,/(.)/g,$+($chr(2) $+ $chr(3),$r(2,15),$chr(2),\1))
ProIcons is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-24-2011 , 07:05   Re: Compile error
Reply With Quote #4

Attach the whole plugin.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
ProIcons
Senior Member
Join Date: Jan 2009
Location: Greece - Salonica
Old 04-24-2011 , 07:09   Re: Compile error
Reply With Quote #5

it is private plugin, ... Tell me what part you want to paste it here...
__________________
function rb return $regsubex($$1-,/(.)/g,$+($chr(2) $+ $chr(3),$r(2,15),$chr(2),\1))
ProIcons is offline
ProIcons
Senior Member
Join Date: Jan 2009
Location: Greece - Salonica
Old 04-24-2011 , 07:12   Re: Compile error
Reply With Quote #6

PHP Code:
new arg1[128]
copyc(arg1,128,botcmd,32
__________________
function rb return $regsubex($$1-,/(.)/g,$+($chr(2) $+ $chr(3),$r(2,15),$chr(2),\1))
ProIcons is offline
vato loco [GE-S]
Veteran Member
Join Date: Oct 2006
Location: Germany
Old 04-24-2011 , 07:14   Re: Compile error
Reply With Quote #7

Quote:
Originally Posted by ConnorMcLeod View Post
Attach the whole plugin.
Quote:
Originally Posted by ProIcons View Post
PHP Code:
new arg1[128]
copyc(arg1,128,botcmd,32
lol
__________________
vato loco [GE-S] is offline
ProIcons
Senior Member
Join Date: Jan 2009
Location: Greece - Salonica
Old 04-24-2011 , 07:15   Re: Compile error
Reply With Quote #8

vato, i just said that is a private plugin, and i can paste some code but not whole...
i paste these two lines because an error in the compiler is here...

new useID = arg2; //614
__________________
function rb return $regsubex($$1-,/(.)/g,$+($chr(2) $+ $chr(3),$r(2,15),$chr(2),\1))
ProIcons is offline
vato loco [GE-S]
Veteran Member
Join Date: Oct 2006
Location: Germany
Old 04-24-2011 , 07:50   Re: Compile error
Reply With Quote #9

i have seen it that it is private
but you came to scripthelp and ask for help...
if you want to get help you have to provide more code...
otherwise it will be difficult to help you .....

post the whole functions where you get errors
and not only pieces of it...
no one here can clairvoyance...
__________________

Last edited by vato loco [GE-S]; 04-24-2011 at 08:18.
vato loco [GE-S] is offline
ProIcons
Senior Member
Join Date: Jan 2009
Location: Greece - Salonica
Old 04-24-2011 , 09:29   Re: Compile error
Reply With Quote #10

PHP Code:
public somecode() {
   new 
arg1[128]
   
copyc(arg1,128,botcmd,32)
   if (
equali(arg1,"IP"))
   {
       new 
useID arg2;  //615
       
new useIP[32];
       
format(useIP,31,"%s",arg3)
       
format(ips[useID],31,"%s",useIP)
   }
   return 
PLUGIN_HANDLED;

Error: Array must be indexed (variable "-unknown-") on line 615
__________________
function rb return $regsubex($$1-,/(.)/g,$+($chr(2) $+ $chr(3),$r(2,15),$chr(2),\1))

Last edited by ProIcons; 04-24-2011 at 09:47.
ProIcons is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:06.


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