SA-MP Forums Archive
Help with four errors. - 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: Help with four errors. (/showthread.php?tid=328456)



Help with four errors. - Azzeto - 24.03.2012

Hey, i'm adding a property system to my TDM so players can own different misc properties. but i'm having an issue with the reading.

Код:
C:\Documents and Settings\john\Desktop\RCTDM\gamemodes\RCTDM.pwn(483) : error 001: expected token: ")", but found "["
C:\Documents and Settings\john\Desktop\RCTDM\gamemodes\RCTDM.pwn(483) : warning 215: expression has no effect
C:\Documents and Settings\john\Desktop\RCTDM\gamemodes\RCTDM.pwn(483) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\john\Desktop\RCTDM\gamemodes\RCTDM.pwn(483) : error 029: invalid expression, assumed zero
C:\Documents and Settings\john\Desktop\RCTDM\gamemodes\RCTDM.pwn(483) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
pawn Код:
public LoadProperty_data(propertyid,name[],value[])
{
    INI_String("Owner",PropertyInfo[propertyid][Owner],100);
    INI_String("PropertyName",PropertyInfo[propertyid][PropertyName],100);
    INI_Int("Price"PropertyInfo[propertyid][Price]);
    INI_Float("x"PropertyInfo[propertyid][x]);
    INI_Float("y"PropertyInfo[propertyid][y]);
    INI_Float("z"PropertyInfo[propertyid][z]);
    INI_Int("Payout"PropertyInfo[propertyid][Payout]);
    INI_Int("PropertyID"PropertyInfo[propertyid][PropertyID]);
    INI_Int("PropertyPickup"PropertyInfo[propertyid][PropertyPickup]);
    return 1;
}



Re: Help with four errors. - Smally - 24.03.2012

Out of these lines which one is 483


Re: Help with four errors. - Azzeto - 24.03.2012

Код:
INI_String("Owner",PropertyInfo[propertyid][Owner],100);
Is the first line.


Re: Help with four errors. - ryansheilds - 24.03.2012

You forgot the comma after the quotes on most of them,
pawn Код:
INI_Int("Price"PropertyInfo[propertyid][Price]);
Should be
pawn Код:
INI_Int("Price",PropertyInfo[propertyid][Price]);



Re: Help with four errors. - Azzeto - 24.03.2012

Код:
C:\Documents and Settings\john\Desktop\RCTDM\gamemodes\RCTDM.pwn(483) : error 001: expected token: ")", but found "["
C:\Documents and Settings\john\Desktop\RCTDM\gamemodes\RCTDM.pwn(483) : warning 215: expression has no effect
C:\Documents and Settings\john\Desktop\RCTDM\gamemodes\RCTDM.pwn(483) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\john\Desktop\RCTDM\gamemodes\RCTDM.pwn(483) : error 029: invalid expression, assumed zero
C:\Documents and Settings\john\Desktop\RCTDM\gamemodes\RCTDM.pwn(483) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Same thing after adding the commas.


Re: Help with four errors. - Face9000 - 24.03.2012

pawn Код:
INI_String("Owner",PropertyInfo[propertyid][PropertyOwner],100);



Re: Help with four errors. - Azzeto - 24.03.2012

Logitech.. How would this help? It didn't work and the only thing I see you changed was the Variable.. But my properties variable is Owner, not PropertyOwner..


Re: Help with four errors. - Twisted_Insane - 24.03.2012

Which is the line now?


Re: Help with four errors. - Face9000 - 24.03.2012

Quote:
Originally Posted by Azzeto
Посмотреть сообщение
Logitech.. How would this help? It didn't work and the only thing I see you changed was the Variable.. But my properties variable is Owner, not PropertyOwner..
Sorry,i tried..because i saw every variable started with "Property" so i thought it was that the problem.


Re: Help with four errors. - Azzeto - 24.03.2012

Yeah, thanks though logitech, @twisted.. still the same line.


Re: Help with four errors. - The DeLuca - 25.03.2012

Код:
public LoadProperty_data(propertyid,name[],value[])
{
    INI_String("Owner",PropertyInfo[propertyid][Owner],100);
    INI_String("PropertyName",PropertyInfo[propertyid][PropertyName],100);
    INI_Int("Price",PropertyInfo[propertyid][Price]);
    INI_Float("x",PropertyInfo[propertyid][x]);
    INI_Float("y",PropertyInfo[propertyid][y]);
    INI_Float("z",PropertyInfo[propertyid][z]);
    INI_Int("Payout",PropertyInfo[propertyid][Payout]);
    INI_Int("PropertyID",PropertyInfo[propertyid][PropertyID]);
    INI_Int("PropertyPickup",PropertyInfo[propertyid][PropertyPickup]);
    return 1;
}
Try this.