AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   array problem :X (https://forums.alliedmods.net/showthread.php?t=28156)

wonsae 05-08-2006 17:21

array problem :X
 
compiling error
Code:

Error: Must be assigned to an array on line 600
code V
Code:
public item_gas(){     new arg[32], arg2[32], id     read_argv(1,arg,31)     read_argv(2,arg2,32)     id = str_to_num(arg)     fuel[id] = str_to_num(arg2)     if(incar[id] == 1){         fuel[id] = arg2     }     else     {         client_print(id,print_chat,"[CarMod] You need to be incar to put in gas!")     }     return PLUGIN_HANDLED }

FatalisDK 05-08-2006 17:35

Code:
public item_gas(){     new arg[32], arg2[32], id     read_argv(1,arg,31)     read_argv(2,arg2,31)     id = str_to_num(arg)     if(incar[id] == 1){         fuel[id] = str_to_num(arg2)     }     else     {         client_print(id,print_chat,"[CarMod] You need to be incar to put in gas!")     }     return PLUGIN_HANDLED }

Greenberet 05-08-2006 17:39

Code:
 public item_gas(){     new arg[32], arg2[32], id     read_argv(1,arg,31)     read_argv(2,arg2,31)     id = str_to_num(arg)     if(incar[id] == 1){         fuel[id] = str_to_num(arg2) // this is 600? now it should work     }     else     {         client_print(id,print_chat,"[CarMod] You need to be incar to put in gas!")     }     return PLUGIN_HANDLED }

wonsae 05-08-2006 17:42

thanks!


All times are GMT -4. The time now is 05:01.

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